Putting column vector in a matrix
3 views (last 30 days)
for i = 1:N
for row = 1 : n
for col = 1:m
grad(row,col)= .... %%%% I get a n x m matrix %%%%
gradv = grad(:); %%% Now I convert the matrix in a column vector %%%
%%%% For the outer loop "for i = 1:N", I get a coulmn vector gradv on every iteration. I want to put it in a matrix N x (nxm).
gradmatrix = gradv (1); gradv(2);... gradv(N) %%% How do I do this?