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

3 visualizaciones (últimos 30 días)
have two nx1 matrices that I want to say for whichever matrix is shorter use that length.

Respuesta aceptada

Walter Roberson
Walter Roberson el 15 de Ag. de 2016
shorter_length = min( length(FirstVector), length(SecondVector) );

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by