Filter löschen
Filter löschen

how to store output for different values of i's ?

1 Ansicht (letzte 30 Tage)
parag gupta
parag gupta am 18 Mär. 2019
Kommentiert: parag gupta am 18 Mär. 2019
for i = 1:4
p1= [1,2;2,3]
end
How to store output for different values of i's so that I end up 4 matrices instead of one matrix.I mean i dont want it to overwrites the matrices in the previous step.I want 4 matrices to be stored at the end.

Akzeptierte Antwort

madhan ravi
madhan ravi am 18 Mär. 2019
p=cell(1,4); % before loop
p{i}=... % inside loop
  5 Kommentare
madhan ravi
madhan ravi am 18 Mär. 2019
You have some problems with copying go back and see the answer I gave you.
parag gupta
parag gupta am 18 Mär. 2019
hahaha ...thanks..i put the wrong bracket.
thanks ravi

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by