Incorrect values for rank

Incorrect values for rank - getting incorrect values using rank - Сообщения

#1 Опубликовано: 21.02.2013 10:57:28
Ward Holloway

Ward Holloway

0 сообщений из 3 понравились пользователям.

Группа: User

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
#2 Опубликовано: 21.02.2013 11:11:35
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

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.
rank.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Опубликовано: 21.02.2013 11:49:09
Ward Holloway

Ward Holloway

0 сообщений из 3 понравились пользователям.

Группа: User

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.
screen grab.JPG
#4 Опубликовано: 21.02.2013 12:04:27
Davide Carpi

Davide Carpi

1415 сообщений из 2872 понравились пользователям.

Группа: Moderator

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
rank.sm (11 КиБ) скачан 30 раз(а).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#5 Опубликовано: 21.02.2013 12:07:37
Ward Holloway

Ward Holloway

0 сообщений из 3 понравились пользователям.

Группа: User

Excellent, thanks to both of you.
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений