How to find the span of a matrix in matlab?

275 次查看(过去 30 天)
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