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.
|
| polyvalm_ps(c,A,s)
|
function [P,s,cost] = polyvalm_ps(c,A,s)
%POLYVALM_PS Evaluate polynomial at matrix argument by Paterson-Stockmeyer alg.
% [P,S,COST] = POLYVALM_PS(C,A,S) evaluates the polynomial whose
% coefficients are the vector C at the matrix A using the
% Paterson-Stockmeyer algorithm. If omitted, the integer parameter
% S is chosen automatically and its value is returned as an
% output argument. COST is the number of matrix multiplications used.
m = length(c)-1; % Degree of poly.
c = c(end:-1:1); c = c(:);
n = length(A);
if nargin < 3
% Determine optimum parameter s.
s = ceil(sqrt(m));
end
r = floor(m/s);
cost = s+r-(m==r*s)-1;
% Apower{i+1} = A^i;
Apower = cell(s+1);
Apower{1} = eye(n);
for i=2:s+1
Apower{i} = A*Apower{i-1};
end
B = cell(r+1);
for k=0:r-1
temp = c(s*k+1)*eye(n);
for j=1:s-1
temp = temp + c(s*k+j+1)*Apower{j+1};
end
B{k+1} = temp;
end
B{r+1} = c(m+1)*Apower{m-s*r+1};
for j=m-1:-1:s*r
if j == s*r
B{r+1} = B{r+1} + c(s*r+1)*eye(n);
else
B{r+1} = B{r+1} + c(j+1)*Apower{m-s*r-(m-j)+1};
end
end
As = Apower{s+1};
P = zeros(n);
for k=r:-1:0
P = P*As + B{k+1};
end
|
|
Contact us at files@mathworks.com