Mercurial > matrix-functions
view mftoolbox/sqrtm_pd.m @ 0:8f23314345f4 draft
Create local repository for matrix toolboxes. Step #0 done.
author | Antonio Pino Robles <data.script93@gmail.com> |
---|---|
date | Wed, 06 May 2015 14:56:53 +0200 |
parents | |
children |
line wrap: on
line source
function [X,k] = sqrtm_pd(A) %SQRTM_PD Square root of positive definite matrix via polar decomposition. % [X,K] = SQRT_PD(A) computes the Hermitian positive definite % square root X of the Hermitian positive definite matrix A. % It computes the Hermitian polar factor of the Cholesky factor of A. % K is the number of Newton polar iterations used. R = chol(A); [U,H,k] = polar_newton(R); X = H;