Matrix square root.

  S = SQRTM(A) is the matrix square root of A.

  Complex results are produced if A has negative eigenvalues.

  A warning message is printed if the computed S*S is not close to A.



  [S,esterr] = sqrtm(A) does not print any warning message, but

  returns an estimate of the relative residual, norm(S*S-A)/norm(A).



  If A is real, symmetric and positive definite, or complex, Hermitian

  and positive definite, then so is the computed matrix square root.



  Some matrices, like A = [0 1; 0 0], do not have any square roots,

  real or complex, and SQRTM cannot be expected to produce one.



  See also EXPM1871LU2, LOGM2174LAB, FUNM193ZLU2.