length of multiple vectors

I am new with Matlab and english it is not my first language, so please have me patience.
I want to know the length of 40 vectors (i created them with a loop and their names are A1, A2, ... , A40). I was thinking of using the command "for" but the problem is that i dont know how can i call 1 vector in each iteration.

Answers (2)

evil_silla
evil_silla on 29 Mar 2013
?

1 Comment

Do not create your variables that way.
Instead of assigning to A10, assign to A{10}. Then when you want to loop over the vectors,
for K = 1 : length(A)
current_vector = A{K};
... work with current vector
end

Sign in to comment.

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Asked:

on 29 Mar 2013

Community Treasure Hunt

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

Start Hunting!