function [z,info] = msign(h,tol,maxit) % % MSIGN computes the matrix sign of a symmetric matrix % % [z,info] = msign(h,tol,maxit) computes the matrix sign z % of the symmetric matrix h by iteration. The assumption % that h is symmetric is not checked. Iteration is stopped % at iteration n whenever n=maxit or % % norm{z(n) - z(n-1)} <= tol*norm{z(n)} % % where norm is the matrix one norm. % % Returned in z is the matrix sign of h unless the algorithm failed % to converge. Returned in info(1) is the number of iterations % performed. info(2)=1 if the algorithm halted because of an % attempted inversion of a singular matrix. % % % REFERENCES: % B.D.O. Anderson(1978) % Laub(1991) % E.W. Anderson, L.P. Hansen, E.R McGrattan and T.J Sargent(1996) % PROGRAM WRITTEN BY: E. W. Anderson Nov 26, 1994 % This file contains the documentation for the mex file MSIGN. This % file is not a MATLAB function. If the following line of code % is executed then you have not properly installed the MEX files. error('MEX file msign.* is not available');