How do i write a code which can calculate the null space basis of two random matrix?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
John D'Errico
le 24 Sep 2019
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.
Réponses (1)
Matt J
le 24 Sep 2019
Modifié(e) : Matt J
le 24 Sep 2019
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 commentaires
Matt J
le 24 Sep 2019
You can, and you have. The output of null is telling you that [0;0;0] is the only null vector.
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!