How to compare the length of two matrices and pick the shorter one?

2 Ansichten (letzte 30 Tage)
have two nx1 matrices that I want to say for whichever matrix is shorter use that length.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 15 Aug. 2016
shorter_length = min( length(FirstVector), length(SecondVector) );

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by