Octave – Algebra lineare – VIII – 104


Argomento nuovo, qui, proseguendo da qui.

Funzioni per matrici

Function File: expm (A)
Return the exponential of a matrix.
The matrix exponential is defined as the infinite Taylor series expm (A) = I + A + A^2/2! + A^3/3! + ....
However, the Taylor series is not the way to compute the matrix exponential; see Moler and Van Loan, Nineteen Dubious Ways to Compute the Exponential of a Matrix, SIAM Review, 1978. This routine uses Ward’s diagonal Padé approximation method with three step preconditioning (SIAM Journal on Numerical Analysis, 1977). Diagonal Padé approximations are rational polynomials of matrices


whose Taylor series matches the first 2q+1 terms of the Taylor series above; direct evaluation of the Taylor series (with the same preconditioning steps) may be desirable in lieu of the Padé approximation when Dq(A) is ill-conditioned.


Function File: s = logm (A)
Function File: s = logm (A, opt_iters)
Function File: [s, iters] = logm (...)

Compute the matrix logarithm of the square matrix A.
The implementation utilizes a Padé approximant and the identity logm (A) = 2^k * logm (A^(1 / 2^k)).
The optional input opt_iters is the maximum number of square roots to compute and defaults to 100.
The optional output iters is the number of square roots actually computed.


Built-in Function: s = sqrtm (A)
Built-in Function: [s, error_estimate] = sqrtm (A)

Compute the matrix square root of the square matrix A.
Ref: N.J. Higham. A New sqrtm for MATLAB. Numerical Analysis Report No. 336, Manchester Centre for Computational Mathematics, Manchester, England, January 1999.


Built-in Function: kron (A, B)
Built-in Function: kron (A1, A2, ...)

Form the Kronecker product of two or more matrices.
This is defined block by block as x = [ a(i,j)*b ].


If there are more than two input arguments A1, A2, ..., An the Kronecker product is computed as kron (kron (A1, A2), ..., An). Since the Kronecker product is associative, this is well-defined.

Built-in Function: blkmm (A, B)
Compute products of matrix blocks.
The blocks are given as 2-dimensional subarrays of the arrays A, B. The size of A must have the form [m,k,...] and size of B must be [k,n,...]. The result is then of size [m,n,...] and is computed as follows:

for i = 1:prod (size (A)(3:end))
  C(:,:,i) = A(:,:,i) * B(:,:,i)


Built-in Function: X = syl (A, B, C)

Solve the Sylvester equation A X + X B = C using standard LAPACK subroutines.



Posta un commento o usa questo indirizzo per il trackback.



Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.

%d blogger hanno fatto clic su Mi Piace per questo: