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.

답변 (2개)

evil_silla
evil_silla 2013년 3월 29일

0 개 추천

?

댓글 수: 1

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

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

질문:

2013년 3월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by