I have a set of linear equation to be solved using \
that is F=JT\RH
where RH is 18x1 and JT is 18x17 and F (unknown) is 17x1, but matlab gives the warning that rank is deficient and the rank is 16. So I want to know which columns/rows are linearly dependent. How can I do this?
Asked
Active
Viewed 7,175 times
2
1 Answers
4
Columns of A are linearly dependent iff null(A) is not zero. Running B=null(A) in Matlab will return you a basis of the null space. For every column in B, take the indices of the non-zero elements in that column. These will be the columns numbers you are looking for. For example, try:
a = rand(18,16);
a(:,17) = a(:,2) + a(:,4);
null(a)

Begelfor
- 358
- 3
- 8
-
I tried your example and the 1st 9th 12th and 13th rows are zero. it should not be like this. – milad Jul 03 '14 at 08:09
-
If you run the example, the non-zeros will be in 2,4 and 17th rows, signifying that the 2nd, 4th and 17th column are linearly dependent – Begelfor Jul 03 '14 at 08:12
-
but when i use this for my own matrix, there are only 4 zero elements. so as you said other 13 columns are dependent, but the rank is 16 not 4. – milad Jul 03 '14 at 08:21
-
The other 13 columns are dependent. That only means that their rank is smaller than 13. In your case that rank is 12. – Begelfor Jul 03 '14 at 08:25