   function   x=vec(X)
%  Use the isometry version
n=size(X,1);
x=X([1:1:n^2])';