length of multiple vectors
Ältere Kommentare anzeigen
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.
Antworten (2)
evil_silla
am 29 Mär. 2013
0 Stimmen
1 Kommentar
Walter Roberson
am 30 Mär. 2013
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
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!