function X = sssMat(x,n,sMind)
%function X = ssMat(x,n,sMind)
%ssMat: isometric operator, convert vector x to symmetric matrix X
%n: size of matrix X
%sMind; vector indices for all elements of X
%tn = length(svind);
tn = n*(n+1)/2;
sqrt2 = sqrt(2);
y = x;
y(1:tn-n) = x(1:tn-n)/sqrt2; %scale the off-diagonal elements for isometry
X = zeros(n);
X(:) = y(sMind);
%X(1:n+1:end) = sqrt2*X(1:n+1:end);
%X(sMind) = x(1:tn-n)/sqrt2; %need to scale off-diagonal
%X = X + X'; %symmetrize X
%add the diagonal
%X(1:n+1:end) = x(tn-n+1:tn);
