No BSD License
-
arnoldi(A,q1,m)
ARNOLDI Arnoldi iteration
-
ascent_seq(A)
ASCENT_SEQ Ascent sequence for square (singular) matrix.
-
cosm(A)
COSM Matrix cosine by double angle algorithm.
-
cosm_pade(A,m,sq)
COSM_PADE Evaluate Pade approximation to the matrix cosine.
-
cosmsinm(A)
COSMSINM Matrix cosine and sine by double angle algorithm.
-
cosmsinm_pade(A,m)
COSMSINM_PADE Evaluate Pade approximations to matrix cosine and sine.
-
expm_cond(A)
EXPM_COND Relative condition number of matrix exponential.
-
expm_frechet_pade(A,E,k)
EXPM_FRECHET_PADE Frechet derivative of matrix exponential via Pade approx.
-
expm_frechet_quad(A,E,theta,r...
EXPM_FRECHET_QUAD Frechet derivative of matrix exponential via quadrature.
-
fab_arnoldi(A,b,fun,m)
FAB_ARNOLDI f(A)*b approximated by Arnoldi method.
-
funm_condest1(A,fun,fun_frech...
FUNM_CONDEST1 Estimate of 1-norm condition number of matrix function.
-
funm_condest_fro(A,fun,fun_fr...
FUNM_CONDEST_FRO Estimate of Frobenius norm condition number of matrix function.
-
funm_ev(A,fun)
FUNM_EV Evaluate general matrix function via eigensystem.
-
funm_simple(A,fun)
FUNM_SIMPLE Simplified Schur-Parlett method for function of a matrix.
-
logm_cond(A)
LOGM_COND Relative condition number of matrix logarithm.
-
logm_frechet_pade(A,E)
LOGM_FRECHET_PADE Frechet derivative of matrix logarithm via Pade approx.
-
logm_iss(A)
LOGM_ISS Matrix logarithm by inverse scaling and squaring method.
-
logm_pade_pf(A,m)
LOGM_PADE_PF Evaluate Pade approximant to matrix log by partial fractions.
-
mft_test(n)
MFT_TEST Test the Matrix Function Toolbox.
-
mft_tolerance(A)
MFT_TOLERANCE Convergence tolerance for matrix iterations.
-
polar_newton(A)
POLAR_NEWTON Polar decomposition by scaled Newton iteration.
-
polar_svd(A)
POLAR_SVD Canonical polar decomposition via singular value decomposition.
-
polyvalm_ps(c,A,s)
POLYVALM_PS Evaluate polynomial at matrix argument by Paterson-Stockmeyer alg.
-
power_binary(A,m)
POWER_BINARY Power of matrix by binary powering (repeated squaring).
-
quasitriang_struct(R)
QUASITRIANG_STRUCT Block structure of upper quasitriangular matrix.
-
riccati_xaxb(A,B)
RICCATI_XAXB Solve Riccati equation XAX = B in positive definite matrices.
-
rootpm_newton(A,p,c)
ROOTPM_NEWTON Coupled Newton iteration for matrix pth root.
-
rootpm_real(A,p)
ROOTPM_REAL Pth root of real matrix via real Schur form.
-
rootpm_schur_newton(A,p)
ROOTPM_SCHUR_NEWTON Matrix pth root by Schur-Newton method.
-
rootpm_sign(A,p)
ROOTPM_SIGN Matrix Pth root via matrix sign function.
-
signm(A)
SIGNM Matrix sign decomposition.
-
signm_newton(A,scal)
SIGNM_NEWTON Matrix sign function by Newton iteration.
-
sqrtm_db(A,scale)
SQRTM_DB Matrix square root by Denman-Beavers iteration.
-
sqrtm_dbp(A,scale)
SQRTM_DBP Matrix square root by product form of Denman-Beavers iteration.
-
sqrtm_newton(A,scal,maxit)
SQRTM_NEWTON Matrix square root by Newton iteration (unstable).
-
sqrtm_newton_full(A, X0)
SQRTM_NEWTON_FULL Matrix square root by full Newton method.
-
sqrtm_pd(A)
SQRTM_PD Square root of positive definite matrix via polar decomposition.
-
sqrtm_pulay(A,D)
SQRTM_PULAY Matrix square root by Pulay iteration.
-
sqrtm_real(A)
SQRTM_REAL Square root of real matrix by real Schur method.
-
sqrtm_triang_min_norm(T)
SQRTM_TRIANG_MIN_NORM Estimated min norm square root of triangular matrix.
-
sylvsol(A,B,C)
SYLVSOL Solve Sylvester equation.
-
Contents.m
-
readme.m
-
View all files
from
The Matrix Function Toolbox
by Nick Higham
A MATLAB toolbox connected with functions of matrices.
|
| logm_iss(A)
|
function [X,k,m] = logm_iss(A)
%LOGM_ISS Matrix logarithm by inverse scaling and squaring method.
% X = LOGM_ISS(A) computes the logarithm of A, for a matrix with no
% nonpositive real eigenvalues, using the inverse scaling and squaring
% method with Pade approximation.
% Matrix square roots are computed by the product form of the
% Denman-Beavers teration.
% [X,K,M] = LOGM_ISS(A) returns the number K of square roots
% computed and the degree M of the Pade approximant.
e = eig(A);
if any( imag(e) == 0 & real(e) <= 0 )
error('A must not have any nonpositive real eigenvalues!')
end
n = length(A);
load log_pade_err_opt % mmax-by-3 matrix DATA.
% mvals = data(:,1);
xvals = data(:,2);
X = A;
k = 0; p = 0; itk = 5;
while 1
normdiff = norm(X-eye(n),1);
if normdiff <= xvals(16)
p = p+1;
j1 = find(normdiff <= xvals(3:16));
j1 = j1(1) + 2;
j2 = find(normdiff/2 <= xvals(3:16));
j2 = j2(1) + 2;
if 2*(j1-j2)/3 < itk || p == 2, m = j1; break, end
end
[X,M,itk] = sqrtm_dbp(X,1); k = k+1;
end
X = 2^k*logm_pade_pf(X-eye(n),m);
if isreal(A), X = real(X); end
|
|
Contact us at files@mathworks.com