I have to generate 20 random matrices, of increasing sizes
200:50:1150 //sizes of 20 random matrices
I want to store them in like an array of matrices:
like
array(1) // should give me the 1st matrix of size 200x200
array(2) // should give me the 2nd matrix of size 250x250 and so on
I am not sure how to do this:
n = 200:50:1150
for i=1:20
M(:,:,i) = rand(n(i)); //This does not work
end
How do I do this, is there a faster way without loops?