finding space basis in matlab

26 次查看(过去 30 天)
ne ne
ne ne 2018-12-27
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 个评论
madhan ravi
madhan ravi 2018-12-27
what's R? what's A? what's your desire output ? Give an example ?
ne ne
ne ne 2018-12-27
A is an mxn table. I have to make this function in order for it to be used in any table given.
R is a space that contains all of the vectors of A.
for example I have to put the table A=[3 -1 7 3 9; -2 2 -2 7 5; -5 9 3 3 4; -2 6 6 3 7 ]

请先登录,再进行评论。

回答(1 个)

John D'Errico
John D'Errico 2018-12-27
编辑:John D'Errico 2018-12-27
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 个评论
John D'Errico
John D'Errico 2020-12-4
编辑:John D'Errico 2020-12-4
@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.

请先登录,再进行评论。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by