help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Re: exponential of a matrix


From: Liam Healy
Subject: Re: [Help-gsl] Re: exponential of a matrix
Date: Sun, 13 Dec 2009 19:41:23 -0500

When I inquired about this before I was told it was unsupported because
it lacked tests.

http://lists.gnu.org/archive/html/help-gsl/2008-08/msg00004.html

A superficial test I tried was correct.  It would nice if
we get got some thorough tests so that it could be
put officially into GSL.

Liam

On Sun, Dec 13, 2009 at 4:56 PM, Carl Boettiger <address@hidden> wrote:
> Hi again,
>
> The command seems to work fine in my example below.  Output in my example
> seems to agree with octave's expm function when the third argument to
> exponential_ss is small enough (type gsl_mode_t, I gather this a precision
> control ).  Anyone use this function or is some other method preferable?
>
> -Carl
>
> #include <stdio.h>
> #include <gsl/gsl_linalg.h>
>
> int
> main (void)
> {
>   double a[9] = {1,2,3,4,5,6,7,8,9};
>   double b[9] = {0};
>
>   gsl_matrix_view m
>     = gsl_matrix_view_array(a, 3, 3);
>   gsl_matrix_view em
>     = gsl_matrix_view_array(b, 3, 3);
>
>   gsl_linalg_exponential_ss(&m.matrix, &em.matrix, .01);
>
>   gsl_matrix_fprintf(stdout, &em.matrix, "%g");
>
>   return 0;
> }
>
>
> On Sun, Dec 13, 2009 at 1:14 PM, Carl Boettiger <address@hidden> wrote:
>
>> Hi,
>>
>> I'm looking to exponentiate a matrix.  It seems there are functions for
>> this in exponential.c under linalg, but I don't see anything about them in
>> the documentation.  How do I call the exponential of a matrix using
>> gsl_linalg_exponential_ss() ?
>>
>> I understand that the matmult functions in linalg can be replaced by blas,
>> but not sure why the exponential is undocumented.  An example of how to
>> compute this would be great.  Thanks!
>>
>> -Carl
>>
>> --
>> Carl Boettiger
>> Population Biology, UC Davis
>> http://two.ucdavis.edu/~cboettig <http://two.ucdavis.edu/%7Ecboettig>
>>
>
>
>
> --
> Carl Boettiger
> Population Biology, UC Davis
> http://two.ucdavis.edu/~cboettig
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>




reply via email to

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