Placing the ouputs of while loop in an array
1 次查看(过去 30 天)
显示 更早的评论
I don't necessarily have a code written, yet but I was just wondering how I could take the outputs(all iterations) of a while loop and return a vector with the outputs.
Thanks.
0 个评论
回答(1 个)
Harshit
2012-11-19
What is the problem. Start putting them as soon as they are generated.
if true
index = 0
a(index)=output
index = index+1
end
2 个评论
另请参阅
类别
在 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!