I am running for loop for 10 times, each time I am getting op as a matrix of size 1*4. I want to store each op so that i will get 10 * 4 matrix?
1 次查看(过去 30 天)
显示 更早的评论
I am doing in simulink. my for loop output is S function output. how to do that? please help?
0 个评论
回答(1 个)
Marco Wassmer
2016-10-3
You could do it like this:
S=[];
dummy=1:1:4;
for n=1:1:10
S(n,:)=dummy;
end
Where dummy is your data and S your result
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!