Need help with subspace basis
Afficher commentaires plus anciens
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 commentaires
KALYAN ACHARJYA
le 1 Déc 2019
for i=1:s1
for i=1:s2
end
Is both are "i"?
Jacked Daniel
le 1 Déc 2019
Réponses (1)
Matt J
le 1 Déc 2019
0 votes
You could just use orth()
3 commentaires
Jacked Daniel
le 3 Déc 2019
Matt J
le 3 Déc 2019
You do realize that the basis for any linear space is non-unique, right?
Jacked Daniel
le 12 Déc 2019
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!