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!