how can I compare the length of two arrays?

2 ビュー (過去 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 Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by