Rank: Newbie
Groups: Registered
Joined: 21/02/2013(UTC) Posts: 3 Location: Barre, MA
|
I'm using SMATH for a controls class that I am taking. I am getting bad values for rank of a matrix.
A=[0,1;1,0] should return a rank of 2 I keep getting a 1
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,990 Was thanked: 1128 time(s) in 724 post(s)
|
Seems that you defined A as a column vector. Depending on your settings, the comma serves as decimal point or as function argument separator. type A:mat Enter This gives you a 2x2 Matrix of placeholders. mkraska attached the following image(s): |
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 21/02/2013(UTC) Posts: 3 Location: Barre, MA
|
The comma's are from my Scilab equation, sorry about the confusion. It looks like my problem is in the way I calculate the matrix. Attached is a quick test I put together. Ward.Holloway attached the following image(s):
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
You have made an error defining Γ You need to use the augment() function; without this function you create a nested matrix. BTW there is a bug because calling directly the rank function when the first matrix element is a nested matrix, a type conversion error appears. regards, w3b5urf3r Edited by user 21 February 2013 19:12:44(UTC)
| Reason: Not specified File Attachment(s): rank.sm (12kb) downloaded 13 time(s). Davide Carpi attached the following image(s): |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Newbie
Groups: Registered
Joined: 21/02/2013(UTC) Posts: 3 Location: Barre, MA
|
Excellent, thanks to both of you.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.