%
% Function y = vec(A), vectorize.
%
function y = vec(A)
   n = size(A,2);
   y = [];
   for i = 1:n
      y = [y; A(:,i)];
   end
end
