how loop output store
1 次查看(过去 30 天)
显示 更早的评论
hi
i have loop output in terms of price after every loop i got the price value ...how can i see this price value in table form..in continuous manner store in one veritable...
0 个评论
采纳的回答
Iman Ansari
2013-4-18
编辑:Iman Ansari
2013-4-18
Hi. What is the size of your price value in each loop:
for i=1:n
% if it is a number
output(i,1)=price;
% if it is a column vector
output(:,i)=price;
% if it is a row vector
output(i,:)=price;
% if it is a matrix or its size changes in each loop
output{i}=price;
end
更多回答(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!