Mercurial > matrix-functions
view mftoolbox/riccati_xaxb.m @ 7:e0817ccb2834 draft
Add square root matrix function file, rename atom at funm_files, modify old toolbox to run it inside GNU Octave.
added funm_files/fun_atom.m
added sqrtm2.m
added toolbox/gecp.m
toolbox/see.m: comment wrong call to subplot
toolbox/tmtdemo.m: add a cast to double, as eig does not admit bool matrix input
removed funm_files/funm_atom.m
author | Antonio Pino Robles <data.script93@gmail.com> |
---|---|
date | Tue, 26 May 2015 18:14:54 +0200 |
parents | 8f23314345f4 |
children |
line wrap: on
line source
function X = riccati_xaxb(A,B) %RICCATI_XAXB Solve Riccati equation XAX = B in positive definite matrices. % X = RICCATI_XAXB(A,B) is the Hermitian positive definite % solution to XAX = B, where A and B are Hermitian positive % definite matrices. R = chol(A); S = chol(B); U = polar_newton(S*R'); X = R\(U'*S); X = (X + X')/2; % [U,H] = polar_newton(R*S'); % Variant derived in solution of Problem 6.21. % X = R\(U*S);