function x = ssvec(X,svind)
%function x = ssvec(X,svind)
%ssvec: isometric operator, convert symmetric matrix X to vector x
%svind: matrix indices for the strictly upper triangular
n = size(X,1);
%tn = length(svind);
tn = n*(n+1)/2;
sqrt2 = sqrt(2);
%diagonal elements does not need to be scaled
x = [X(svind)*sqrt2; X(1:n+1:end)'];
