Hey, I've been able to find a lot of solutions for my matlab program on this site but the next problem still goes unanswered.
I have a loop in which every run a vector is created with a random size. After the loop is finished I want all these vectors presented in a matrix with each vector as a column. How can I do this? The shorter vectors may either be filled with NaN's or zero's.
In essence the program looks like this:
for i=1:1:10; l=ceil(rand(1)*10); vector=rand(l,1);endmatrix=[vector1 vector2 ... vector10 ];
Thanks in advance for helping me out.
Best Answer