Mercurial > octave-antonio
comparison scripts/linear-algebra/logm.m @ 11587:c792872f8942
all script files: untabify and strip trailing whitespace
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:35:29 -0500 |
parents | fd0a3ac60b0e |
children | 7ef7e20057fa |
comparison
equal
deleted
inserted
replaced
11586:12df7854fa7c | 11587:c792872f8942 |
---|---|
33 ## to compute and defaults to 100. The optional output @var{iters} is the | 33 ## to compute and defaults to 100. The optional output @var{iters} is the |
34 ## number of square roots actually computed. | 34 ## number of square roots actually computed. |
35 ## | 35 ## |
36 ## @end deftypefn | 36 ## @end deftypefn |
37 | 37 |
38 ## Reference: N. J. Higham, Functions of Matrices: Theory and Computation | 38 ## Reference: N. J. Higham, Functions of Matrices: Theory and Computation |
39 ## (SIAM, 2008.) | 39 ## (SIAM, 2008.) |
40 ## | 40 ## |
41 | 41 |
42 function [s, iters] = logm (A, opt_iters = 100) | 42 function [s, iters] = logm (A, opt_iters = 100) |
43 | 43 |
44 if (nargin == 0 || nargin > 2) | 44 if (nargin == 0 || nargin > 2) |
45 print_usage (); | 45 print_usage (); |
46 endif | 46 endif |
47 | 47 |
48 if (! issquare (A)) | 48 if (! issquare (A)) |
106 | 106 |
107 endfunction | 107 endfunction |
108 | 108 |
109 ################## ANCILLARY FUNCTIONS ################################ | 109 ################## ANCILLARY FUNCTIONS ################################ |
110 ###### Taken from the mfttoolbox (GPL 3) by D. Higham. | 110 ###### Taken from the mfttoolbox (GPL 3) by D. Higham. |
111 ###### Reference: | 111 ###### Reference: |
112 ###### D. Higham, Functions of Matrices: Theory and Computation | 112 ###### D. Higham, Functions of Matrices: Theory and Computation |
113 ###### (SIAM, 2008.). | 113 ###### (SIAM, 2008.). |
114 ####################################################################### | 114 ####################################################################### |
115 | 115 |
116 ##LOGM_PADE_PF Evaluate Pade approximant to matrix log by partial fractions. | 116 ##LOGM_PADE_PF Evaluate Pade approximant to matrix log by partial fractions. |
117 ## Y = LOGM_PADE_PF(A,M) evaluates the [M/M] Pade approximation to | 117 ## Y = LOGM_PADE_PF(A,M) evaluates the [M/M] Pade approximation to |