finding space basis in matlab
Afficher commentaires plus anciens
hello!i am new to matlab and i really would appreciate your help. I need to make a funtion into which i can put an mxn table. This function will find the basis of the space R(A) and the basis of space R(A').
2 commentaires
madhan ravi
le 27 Déc 2018
what's R? what's A? what's your desire output ? Give an example ?
ne ne
le 27 Déc 2018
Réponses (1)
John D'Errico
le 27 Déc 2018
Modifié(e) : John D'Errico
le 27 Déc 2018
A=[3 -1 7 3 9; -2 2 -2 7 5; -5 9 3 3 4; -2 6 6 3 7 ]
A is a matrix, not a table. This is a table:
T = table(A)
T =
4×1 table
A
__________________________
3 -1 7 3 9
-2 2 -2 7 5
-5 9 3 3 4
-2 6 6 3 7
If you have actually stored A as a table, then you can extract the data from it using table2array. Regardless, if all you want to do is form the row and column basis representations for a matrix A, this is easy enough. Just use orth, twice.
Note that A was 4x5, but with a rank of 3, as we learn here:
rank(A)
ans =
3
So each basis system will have three basis vectors. The row space of A is spanned by three row vectors:
orth(A.').'
ans =
0.16491 -0.45832 -0.42192 -0.3853 -0.66051
0.55328 -0.63554 0.38877 -0.062596 0.3673
0.0042955 -0.31674 -0.62059 0.68313 0.21877
And the column space of A is spanned by three column vectors.
orth(A)
ans =
-0.48382 0.79099 0.0005431
-0.34036 -0.17083 0.92116
-0.53232 -0.58716 -0.25742
-0.60556 -0.019817 -0.2919
1 commentaire
John D'Errico
le 4 Déc 2020
Modifié(e) : John D'Errico
le 4 Déc 2020
@SAJJA BALA KARTHIKEYA asked a question (which I have moved into this comment):
"how to find row space of a matrix?"
First, this is not an answer to the question. It is just another question, saying that you did not understand my answer.
But then I would be forced to ask what did I mean when I explicitly stated the solution in my answer:
The row space of A is spanned by the row vectors:
orth(A.').'
As such, your question (asked as an answer) already had an answer.
Catégories
En savoir plus sur Vector Spaces and Subspaces 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!