I have this code:
x=1:10;for i=1:length(x); y=rand(i)end
which is doing what I want to, but it's not saving the answers in my workspace, so I tried this:
x=1:10;for i=1:length(x); y(i)=rand(i)end But that comes out with an error that says, "In an assignment A(:) = B, the number of elements in A and B must be the same."
Thanks for the help..
Best Answer