Greetings: let's suppose I have a loop that will execute 20 times, and within that loop I'll obtain a vector of information whose length will increase, each iteration, from 2 to 20. Now suppose I have a matrix of dimension 20, and during each iteration, I'd like to store that vector to one row of the matrix. For n = 2, the vector is length 2, and when I assign it to the first row of the matrix, call it A, I might try something like A(1,:) = p. But, since the length of the first row is 2o, and length of p is 2, there's a mismatch. Any clever suggestions on how to get around this issue.
Thanks so much...
John Sevic
p's length to be 20 would work too. – Shuhao Cao Apr 29 '13 at 17:56