Integral of expm function

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Integral of expm function

Montgomery-Smith, Stephen
In a post on the octave-maintainers mailing list, someone referenced this:

http://slicot.org/objects/software/shared/doc/MB05ND.html

It includes a function that computes

H(t,A) = integral_0^t expm(s*A) ds

Is there an octave function that computes H?  This would be useful for
me.  I did consider using

inv(A) * expm(t*A)

but my matrix A happens to be singular.

Reply | Threaded
Open this post in threaded view
|

Re: Integral of expm function

Torsten Lilge
On Mon, 2020-07-20 at 21:56 +0000, Montgomery-Smith, Stephen wrote:

> In a post on the octave-maintainers mailing list, someone referenced
> this:
>
> http://slicot.org/objects/software/shared/doc/MB05ND.html
>
> It includes a function that computes
>
> H(t,A) = integral_0^t expm(s*A) ds
>
> Is there an octave function that computes H?  This would be useful for
> me.  I did consider using
>
> inv(A) * expm(t*A)
>
> but my matrix A happens to be singular.
>

Please try

M = [ A, eye(n,n) ; zeros(n,2*n) ];
expM = expm (M*T);

Then expM(1:n;n+1:2*n) should contain the desired matrix H(T,A).

Torsten




Reply | Threaded
Open this post in threaded view
|

Re: Integral of expm function

Montgomery-Smith, Stephen
On 7/21/20 12:23 AM, Torsten Lilge wrote:

> On Mon, 2020-07-20 at 21:56 +0000, Montgomery-Smith, Stephen wrote:
>> In a post on the octave-maintainers mailing list, someone referenced
>> this:
>>
>> http://slicot.org/objects/software/shared/doc/MB05ND.html
>>
>> It includes a function that computes
>>
>> H(t,A) = integral_0^t expm(s*A) ds
>>
>> Is there an octave function that computes H?  This would be useful for
>> me.  I did consider using
>>
>> inv(A) * expm(t*A)
>>
>> but my matrix A happens to be singular.
>>
>
> Please try
>
> M = [ A, eye(n,n) ; zeros(n,2*n) ];
> expM = expm (M*T);
>
> Then expM(1:n;n+1:2*n) should contain the desired matrix H(T,A).
>
> Torsten

Thank you.  That is very clever!