필터 지우기
필터 지우기

How do i write a code which can calculate the null space basis of two random matrix?

조회 수: 3 (최근 30일)
How do i write a code which can calculate the null space basis of two random matrix?
a=randn(5,3)
b=randn(5,3)
c=null([a;b])
The window always show me
Empty matrix: 5-by-0
Or is there any condition of matrix before we use the null command?
  댓글 수: 4
John D'Errico
John D'Errico 2019년 9월 24일
If the combined matrices are full rank when you combine them, the null space is empty. The probability is 1 that any random parir of matrices has full rank as you have built them.
Therfore that you got an empty result is TOTALLY expected. In fact, I would be immensely surprised if two such random 5x3 matrices, then combined into a 5x6 matrix did not have a rank of 5.
yang-En Hsiao
yang-En Hsiao 2019년 9월 24일
but you can find the null space by svd,why can't i use the null command to find the null space

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

답변 (1개)

Matt J
Matt J 2019년 9월 24일
편집: Matt J 2019년 9월 24일
This is the result the code you posted produces,
c =
3×0 empty double matrix
The matrix [a;b] has full column rank,
>> rank([a;b])
ans =
3
and so has no non-trivial null vectors. Plain and simple.
  댓글 수: 2
yang-En Hsiao
yang-En Hsiao 2019년 9월 24일
but you can find the null space by svd,why can't i use the null command to find the null space
Matt J
Matt J 2019년 9월 24일
You can, and you have. The output of null is telling you that [0;0;0] is the only null vector.

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

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by