function retval = vec(A) % usage: retval = vec(A) [m,n] = size(A); retval = reshape(A,m*n,1);