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 Comments

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

Sign in to comment.

Answers (0)

Categories

Find more on Parallel Computing in Help Center and File Exchange

Asked:

on 10 Mar 2018

Commented:

on 10 Mar 2018

Community Treasure Hunt

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

Start Hunting!