how can I compare the length of two arrays?

1 visualización (últimos 30 días)
Seba.V
Seba.V el 22 de Ag. de 2019
Respondida: Walter Roberson el 22 de Ag. de 2019
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!

Respuestas (1)

Walter Roberson
Walter Roberson el 22 de Ag. de 2019
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
?

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by