function A = ReArrange(B,c); % A = rearrange(B,c); % % Rearrange the column vector c to the shape of the matrix B. % % Matlab command B(:) = c; A = B; A = B; [M,N] = size(B); for n = 1:N, A(:,n) = c((n-1)*M+1:n*M); end;