How to compare the length of two matrices and pick the shorter one?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
matlabuser12
le 15 Août 2016
Réponse apportée : Walter Roberson
le 15 Août 2016
have two nx1 matrices that I want to say for whichever matrix is shorter use that length.
0 commentaires
Réponse acceptée
Walter Roberson
le 15 Août 2016
shorter_length = min( length(FirstVector), length(SecondVector) );
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Multidimensional Arrays 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!