how can I compare the length of two arrays?

조회 수: 6 (최근 30일)
Seba.V
Seba.V 2019년 8월 22일
답변: Walter Roberson 2019년 8월 22일
Given a= [3 3] and b= [ 1 2 2 3 3 4] how can i compare the arrays to see how much bigger is b compared to a?
ans= 4
Thank you!

답변 (1개)

Walter Roberson
Walter Roberson 2019년 8월 22일
You can look at length()
However, you need to be careful about how you define length of an array. How does the length of
1 2
2 3
3 4
5 6
compare to the length of
7 8 9
?

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by