
square root of a matrix
Hi,
I want to find the square root of a matrix in C. I know there is command like "dpotrf" in C to find the cholesky decomposition, which gives us X, where XX' = A. But this method fails when A is positive semidefinite or negative definite. However, there is a command "sqrtm" in MATLAB which gives the square root of even a positive semidefinite or negative definite matrix such that YY = A, where Y is the square root of matrix A. Is there any thing similar to "sqrtm" in C???

Once you write it, there will be.

> I know there is command like "dpotrf" in C to find the cholesky decomposition
No there isn't.
What there is is a library with a 'C' interface you can call from your C programs,
> However, there is a command "sqrtm" in MATLAB
So use a matlab C library binding then
matlab c api  Google Search