How to find the span of a matrix in matlab?

조회 수: 290 (최근 30일)
sofia
sofia 2024년 3월 1일
답변: Catalytic 2024년 3월 1일
I am trying to find the span of a matrix but im not sure how to ask matlab to find it for me.
Let A = [−1 5 1 10 0 5; 1 5 0 4 0 5;2 10 1 2 1 7;−1 5 2 8 2 1] . Find spanning sets for N (A) and col(A)
this is the question but im not sure how to ask it on matlab.

답변 (2개)

Matt J
Matt J 2024년 3월 1일
편집: Matt J 2024년 3월 1일
You can use this,
A = [-1 -5 -1 10 0 5; 1 5 0 -4 0 -5;2 10 -1 -2 -1 -7;-1 -5 2 -8 2 -1]
A = 4×6
-1 -5 -1 10 0 5 1 5 0 -4 0 -5 2 10 -1 -2 -1 -7 -1 -5 2 -8 2 -1
Asub=licols(A)
Asub = 4×3
-5 10 5 5 -4 -5 10 -2 -7 -5 -8 -1
  댓글 수: 1
Torsten
Torsten 2024년 3월 1일
And if by N(A) you mean the kernel of A, you can use:
A = [-1 -5 -1 10 0 5; 1 5 0 -4 0 -5;2 10 -1 -2 -1 -7;-1 -5 2 -8 2 -1]
A = 4×6
-1 -5 -1 10 0 5 1 5 0 -4 0 -5 2 10 -1 -2 -1 -7 -1 -5 2 -8 2 -1
null(A)
ans = 6×3
-0.8674 0.4588 0.0506 0.2671 0.1026 0.2325 -0.1868 -0.4006 0.8735 -0.0311 -0.0668 0.1456 0.3555 0.7434 0.3784 0.1185 0.2478 0.1261
Together with @Matt J 's answer, this shows that
is true.

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


Catalytic
Catalytic 2024년 3월 1일
Use orth and null,
A = [-1 -5 -1 10 0 5; 1 5 0 -4 0 -5;2 10 -1 -2 -1 -7;-1 -5 2 -8 2 -1];
spanset=orth(A)
spanset = 4×3
0.6338 0.3530 0.6882 -0.4482 0.0376 0.3935 -0.6224 0.4626 0.3359 -0.0998 -0.8124 0.5086
rank([A,spanset])==rank(A)
ans = logical
1

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by