フィルターのクリア

'Rank' function

16 ビュー (過去 30 日間)
Ahmad Karnama
Ahmad Karnama 2012 年 3 月 6 日
I am wondering what is the output of 'rank' function in Matlab: For example:
>> A=[1 2 1 4; 2 3 1 3; 3 2 1 2; 4 3 1 1] A = 1 2 1 4 2 3 1 3 3 2 1 2 4 3 1 1 >> rank(A) ans = 3
and
>> rank(A(:,[1 2 3])) ans = 3
but
>> rank(A(:,[1 2 4])) ans = 3
and
>> rank(A(:,[1 3 4])) ans = 2
and
>> rank(A(:,[2 3 4])) ans = 3
Thanks in advance if someone tell me what are the output numbers?

回答 (3 件)

Thomas
Thomas 2012 年 3 月 6 日
doc rank
The rank function provides an estimate of the number of linearly independent rows or columns of a full matrix.
k = rank(A) returns the number of singular values of A that are larger than the default tolerance, max(size(A))*eps(norm(A)).
k = rank(A,tol) returns the number of singular values of A that are larger than tol

Ahmad Karnama
Ahmad Karnama 2012 年 3 月 6 日
Thanks Thomas! I read this on the website and matlab help but I am wondering it it estimated the linearly independent 'rows' or 'columns'?? and how can you interpret the results I am getting? Regards, Ahmad
  1 件のコメント
Thomas
Thomas 2012 年 3 月 6 日
A
A =
1.00 2.00 1.00 4.00
2.00 3.00 1.00 3.00
3.00 2.00 1.00 2.00
4.00 3.00 1.00 1.00
>> A(:,[2 3 4])
ans =
2.00 1.00 4.00
3.00 1.00 3.00
2.00 1.00 2.00
3.00 1.00 1.00
>> A(:,[1 2 3])
ans =
1.00 2.00 1.00
2.00 3.00 1.00
3.00 2.00 1.00
4.00 3.00 1.00
>> rank(A(:,[1 2 3]))
ans =
3.00
A(:,[1 2 3]) gives a new matrix with col 1,2 and 3 from A
and
rank(A(:,[1 2 3]))
ans =
3.00
gives the rank of this new matrix..

サインインしてコメントする。


Jan
Jan 2012 年 3 月 6 日
A = [1 2 1 4; 2 3 1 3; 3 2 1 2; 4 3 1 1]
rank(A) ans = 3
This means, that A has 3 independend rows or columns.
rank(A(:,[1 2 3])) ans = 3
The first three columns are independent.
rank(A(:,[1 2 4])) ans = 3
The columns 1,2,3 are also independent.
rank(A(:,[1 3 4])) ans = 2
One vector of this set is a linear combination of the two others.
rank(A(:,[2 3 4])) ans = 3
These three columns are independent again.
This is only the application of the definition Thomas has given already. Therefore I do not understand the problem.

カテゴリ

Help Center および File ExchangeSparse Matrices についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by