Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bestun

Posts: 5
Registered: 8/11/12
What this matrix mean
Posted: Aug 11, 2012 2:02 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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];
padN_local(1, 2 * i - 1) = -1;
padN_local(2, 2 * i) = -1;
padN = [padN; padN_local];
[padN];
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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.