W*W’ hermitian factorization
sqroot(X)
:X symmetric non negative definite real or complex matrix :
returns W such that X=W*W’ (uses SVD).
X=`rand`_(5,2)*`rand`_(2,5);X=X*X';
W=sqroot(X)
`norm`_(W*W'-X,1)
X=`rand`_(5,2)+%i*`rand`_(5,2);X=X*X';
W=sqroot(X)
`norm`_(W*W'-X,1)