MATLAB Answers

Seba.V
0

how can I compare the length of two arrays?

Asked by Seba.V
on 22 Aug 2019 at 5:19
Latest activity Answered by Walter Roberson
on 22 Aug 2019 at 5:27
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!

  0 Comments

Sign in to comment.

1 Answer

Answer by Walter Roberson
on 22 Aug 2019 at 5:27

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
?

  0 Comments

Sign in to comment.