how loop output store
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Iman Ansari
am 18 Apr. 2013
Bearbeitet: Iman Ansari
am 18 Apr. 2013
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
Weitere Antworten (0)
Siehe auch
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!