How to put a list of different arrays, one below another, to create a new array ?
Ältere Kommentare anzeigen
What I am asking is similar to this example,
I have y1,y2,y3 manually created and I want my final array to be
data = [y1;y2;y3];
How am i supposed to do the same thing inside a for loop ?
for i=1:10
y = myfunc();
data = ??
end
I hope you understood what I cant do and I sincerely hope this can be done someway.
P.S.: I am aware of allocating memory space for the dynamically created array data
Thanks for your time in advance !
Akzeptierte Antwort
Weitere Antworten (1)
Iain
am 7 Jun. 2013
array = [];
for i = 1:10
...
array = [array; addthis];
...
end
3 Kommentare
Stamatis Samaras
am 7 Jun. 2013
Iain
am 7 Jun. 2013
It is whatever you want to add to the bottom of the array, whether its a new row, or 15 new rows.
Stamatis Samaras
am 7 Jun. 2013
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!