how can I compare the length of two arrays?

4 次查看(过去 30 天)
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