How to store the intermediate values in a for loop
Ältere Kommentare anzeigen
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 Kommentare
Stephen23
am 10 Mär. 2018
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:
RAJASEKAR S
am 10 Mär. 2018
Antworten (0)
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!