Need help with subspace basis
古いコメントを表示
I'm writing a script to find the basis of subspace spanned by a vector set and by a homogenous system. In the case with the vector set, I plan to put my given matrix through rref to find the pivots and from there point out the vectors that are the bases.
Here's what I got so far
disp('input matrix')
A = input('A=')
Ar = rref(A)
s = size(Ar)
s1=s(1)
s2=s(2)
for i=1:s1
for i=1:s2
if Ar(i)== 1
A(:,i)
end
end
end
2 件のコメント
KALYAN ACHARJYA
2019 年 12 月 1 日
for i=1:s1
for i=1:s2
end
Is both are "i"?
Jacked Daniel
2019 年 12 月 1 日
回答 (1 件)
Matt J
2019 年 12 月 1 日
0 投票
You could just use orth()
3 件のコメント
Jacked Daniel
2019 年 12 月 3 日
Matt J
2019 年 12 月 3 日
You do realize that the basis for any linear space is non-unique, right?
Jacked Daniel
2019 年 12 月 12 日
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!