Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: What this matrix mean
Replies: 4   Last Post: Aug 11, 2012 5:19 PM

 Messages: [ Previous | Next ]
 Bestun Posts: 5 Registered: 8/11/12
What this matrix mean
Posted: Aug 11, 2012 2:02 PM

Dear all
This is a section of my code that I am using:
***********************************************
function [objP, padN, N] = plasticMultiplierTerms(nodes, discs, c, phiDegrees,rw, a, Yw, rd, rsat);
global flag;
objP = sparse(0, 0); padN = sparse(0, 0); N = sparse(0, 0); count = 1; tan_phi = tan(pi * phiDegrees / 180);
for i = 1 : size(discs, 1);
if (discs(i, 3) < 2) % i.e. if rigid or symmetry
[eff_c eff_tanPhi] = deal(c * (discs(i, 3) ~= 1), tan_phi * (discs(i, 3) ~= 1));
[n1 n2 len] = deal(discs(i, 1), discs(i, 2), discs(i, 4));
Tensile = unsatCohesion(nodes(n1,2), nodes(n1, 3), nodes(n2,2), nodes(n2, 3), tan_phi, len, rw, a, Yw, rd, rsat);
Ts = Tensile/len;
[con var] = deal(2 * count - 1, 2 * count - 1);
N_local = [1 -1 1 -1; eff_tanPhi eff_tanPhi 1000 1000];
[N_local]
N([con con + 1], [var var + 1 1 2]) = N_local;
N([con con + 1], [var var + 1 10 10])
padN_local = sparse(2, 2 * size(discs, 1)); %All zero sparse: 2-by-12
padN_local(1, 2 * i - 1) = -1;
padN_local(2, 2 * i) = -1;
objP = [objP eff_c * discs(i, 4) Ts*discs(i, 4) 0 0 eff_c * discs(i, 4) Ts*discs(i, 4) 0 0 ];
[objP];
count = count + 1;
end
end
***********************************
I have this( N([con con + 1], [var var + 1 1 2])) matrix and I want to equalize it to N_local matrix
N([con con + 1], [var var + 1 1 2]) = N_local;
but for the above term they are not equal. I tried to change :
N([con con + 1], [var var + 1 1 2]) to N([con con + 1], [var var + 1 2 3) , but also I got different answer comparing to N_local

could any one help me how to do this and what this term mean N([con con + 1], [var var + 1 1 2]) ?

Regards
Bestun

Date Subject Author
8/11/12 Bestun
8/11/12 dpb
8/11/12 Bestun
8/11/12 Bruno Luong
8/11/12 dpb