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

조회 수: 3 (최근 30일)
have two nx1 matrices that I want to say for whichever matrix is shorter use that length.

채택된 답변

Walter Roberson
Walter Roberson 2016년 8월 15일
shorter_length = min( length(FirstVector), length(SecondVector) );

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by