How to store the intermediate values in a for loop

for i=(1:4) Vmi=[X(i),Z(i)] end [X(i),Z(i)] are known How to store the values as Vm1,Vm2.. Thanks in advance.

댓글 수: 2

See also the earlier question:
@RAJASEKAR S: use indexing. Indexing is simple and very efficient, unlike what you are trying to do. You can learn about indexing by doing the introductory tutorials:
The introductory tutorials teach basic concepts like using indexing, which is why they are recommended for all beginners. If you want to learn how to use MATLAB effectively then do those tutorials. Do NOT try to create variable names in a loop, unless you want to force yourself into writing slow, complex, buggy code:
Thanks for the source Sir

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Parallel Computing에 대해 자세히 알아보기

질문:

2018년 3월 10일

댓글:

2018년 3월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by