comparison scripts/linear-algebra/expm.m @ 8517:81d6ab3ac93c

Allow documentation tobe built for other formats than tex and info
author sh@sh-laptop
date Wed, 14 Jan 2009 20:44:25 -0500
parents bc982528de11
children e07e93c04080
comparison
equal deleted inserted replaced
8516:e2a179415bac 8517:81d6ab3ac93c
25 ## $$ 25 ## $$
26 ## \exp (A) = I + A + {A^2 \over 2!} + {A^3 \over 3!} + \cdots 26 ## \exp (A) = I + A + {A^2 \over 2!} + {A^3 \over 3!} + \cdots
27 ## $$ 27 ## $$
28 ## @end tex 28 ## @end tex
29 ## @end iftex 29 ## @end iftex
30 ## @ifinfo 30 ## @ifnottex
31 ## 31 ##
32 ## @example 32 ## @example
33 ## expm(a) = I + a + a^2/2! + a^3/3! + ... 33 ## expm(a) = I + a + a^2/2! + a^3/3! + ...
34 ## @end example 34 ## @end example
35 ## 35 ##
36 ## @end ifinfo 36 ## @end ifnottex
37 ## The Taylor series is @emph{not} the way to compute the matrix 37 ## The Taylor series is @emph{not} the way to compute the matrix
38 ## exponential; see Moler and Van Loan, @cite{Nineteen Dubious Ways to 38 ## exponential; see Moler and Van Loan, @cite{Nineteen Dubious Ways to
39 ## Compute the Exponential of a Matrix}, SIAM Review, 1978. This routine 39 ## Compute the Exponential of a Matrix}, SIAM Review, 1978. This routine
40 ## uses Ward's diagonal 40 ## uses Ward's diagonal
41 ## @iftex 41 ## @iftex
42 ## @tex 42 ## @tex
43 ## Pad\'e 43 ## Pad\'e
44 ## @end tex 44 ## @end tex
45 ## @end iftex 45 ## @end iftex
46 ## @ifinfo 46 ## @ifnottex
47 ## Pade' 47 ## Pade'
48 ## @end ifinfo 48 ## @end ifnottex
49 ## approximation method with three step preconditioning (SIAM Journal on 49 ## approximation method with three step preconditioning (SIAM Journal on
50 ## Numerical Analysis, 1977). Diagonal 50 ## Numerical Analysis, 1977). Diagonal
51 ## @iftex 51 ## @iftex
52 ## @tex 52 ## @tex
53 ## Pad\'e 53 ## Pad\'e
54 ## @end tex 54 ## @end tex
55 ## @end iftex 55 ## @end iftex
56 ## @ifinfo 56 ## @ifnottex
57 ## Pade' 57 ## Pade'
58 ## @end ifinfo 58 ## @end ifnottex
59 ## approximations are rational polynomials of matrices 59 ## approximations are rational polynomials of matrices
60 ## @iftex 60 ## @iftex
61 ## @tex 61 ## @tex
62 ## $D_q(a)^{-1}N_q(a)$ 62 ## $D_q(a)^{-1}N_q(a)$
63 ## @end tex 63 ## @end tex
64 ## @end iftex 64 ## @end iftex
65 ## @ifinfo 65 ## @ifnottex
66 ## 66 ##
67 ## @example 67 ## @example
68 ## -1 68 ## -1
69 ## D (a) N (a) 69 ## D (a) N (a)
70 ## @end example 70 ## @end example
71 ## 71 ##
72 ## @end ifinfo 72 ## @end ifnottex
73 ## whose Taylor series matches the first 73 ## whose Taylor series matches the first
74 ## @iftex 74 ## @iftex
75 ## @tex 75 ## @tex
76 ## $2 q + 1 $ 76 ## $2 q + 1 $
77 ## @end tex 77 ## @end tex
78 ## @end iftex 78 ## @end iftex
79 ## @ifinfo 79 ## @ifnottex
80 ## @code{2q+1} 80 ## @code{2q+1}
81 ## @end ifinfo 81 ## @end ifnottex
82 ## terms of the Taylor series above; direct evaluation of the Taylor series 82 ## terms of the Taylor series above; direct evaluation of the Taylor series
83 ## (with the same preconditioning steps) may be desirable in lieu of the 83 ## (with the same preconditioning steps) may be desirable in lieu of the
84 ## @iftex 84 ## @iftex
85 ## @tex 85 ## @tex
86 ## Pad\'e 86 ## Pad\'e
87 ## @end tex 87 ## @end tex
88 ## @end iftex 88 ## @end iftex
89 ## @ifinfo 89 ## @ifnottex
90 ## Pade' 90 ## Pade'
91 ## @end ifinfo 91 ## @end ifnottex
92 ## approximation when 92 ## approximation when
93 ## @iftex 93 ## @iftex
94 ## @tex 94 ## @tex
95 ## $D_q(a)$ 95 ## $D_q(a)$
96 ## @end tex 96 ## @end tex
97 ## @end iftex 97 ## @end iftex
98 ## @ifinfo 98 ## @ifnottex
99 ## @code{Dq(a)} 99 ## @code{Dq(a)}
100 ## @end ifinfo 100 ## @end ifnottex
101 ## is ill-conditioned. 101 ## is ill-conditioned.
102 ## @end deftypefn 102 ## @end deftypefn
103 103
104 function r = expm (a) 104 function r = expm (a)
105 105