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

1 次查看(过去 30 天)
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.

采纳的回答

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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by