finding space basis in matlab

조회 수: 13 (최근 30일)
ne ne
ne ne 2018년 12월 27일
편집: John D'Errico 2020년 12월 4일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Vector Spaces and Subspaces에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by