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

matrix array

have two nx1 matrices that I want to say for whichever matrix is shorter use that length.

Best Answer

shorter_length = min( length(FirstVector), length(SecondVector) );
Related Question