help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exp(A) where A is a matix


From: A. Scottedward Hodel
Subject: Re: exp(A) where A is a matix
Date: Wed, 04 Aug 1999 07:46:02 -0400

In an m-file, exp(A) computes the exponentials of the scalar elements,
whereas expm(A) computes the matrix exponential using the 8th order
Pade approximation with the preconditioning techniques in Ward's 1977
paper; see also Moler and van Loan's paper (1977 or 1978) called
"Nineteen Dubious ways to Compute the Matrix Exponential."  Haven't
looked in the octave sources, but it would take less time to write

    #include <math.h>
    ...
    Matrix retval = ...;

    for (int ii = 0 ; ii < retval.rows() ; ii++)
      for ( int jj = 0 ; jj < retval.columns() ; jj++)
        retval(ii,jj) = exp(retval(ii,jj));


than to dig through the code.  [Eventually, guilt would
catch up to me and I'd have to search through the liboctave
and src/DLD-FUNCTIONS sources to see how the exp function handles
matrix arguments.]


--
A S Hodel Assoc. Prof. Dept Elect Eng, Auburn Univ,AL  36849-5201
On leave at NASA Marshall Space Flight Center (256) 544-1426
Address until 15 Mar 2000:Mail Code ED-13, MSFC, Alabama, 35812
http://www.eng.auburn.edu/~scotte

----------
>From: Daniel Heiserer <address@hidden>
>To: address@hidden, "address@hidden"
<address@hidden>
>Subject: Re: exp(A) where A is a matix
>Date: Wed, Aug 4, 1999, 3:12 AM
>

> address@hidden wrote:
>>
>> How do I implement exp(A), where A is a matix, in an .oct file?  The only
thing
>
> ??? AFAIK: exp(A)=sum_{n=0;n<=inf;n++}(1/n! A^n)
>
> This IS the matrix exponential or not?
>
> Do you want the power of A?
>
> A^n
>
>
>> I could find is A.expm but this return the matrix exponential.  I want the
thing
>> that returns a matrix B where Bij = exp(Aij).
>>
>> Heber Farnsworth
>>
>> ---------------------------------------------------------------------
>> Octave is freely available under the terms of the GNU GPL.  To ensure
>> that development continues, see www.che.wisc.edu/octave/giftform.html
>> Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
>> ---------------------------------------------------------------------
>
> daniel
>
>
>
> ---------------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.  To ensure
> that development continues, see www.che.wisc.edu/octave/giftform.html
> Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
> ---------------------------------------------------------------------
> 



---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]