From: Raul on 3 May 2010 07:07 Hi All, I was wondering if anyone out there knows a fast alternative to the matrix exponential function expm. Perhaps there is a mex file out there somewhere? The matrix I am considering does not have any special form, except that all its entries are real numbers. I have considered the expokit package, but was wondering if there is anything faster out there. Thank you very much, --Raul Gonzalez
From: John D'Errico on 3 May 2010 07:29 "Raul " <ragonzal(a)alum.mit.edu> wrote in message <hrmaop$at$1(a)fred.mathworks.com>... > Hi All, > > I was wondering if anyone out there knows a fast alternative to the matrix exponential function expm. Perhaps there is a mex file out there somewhere? The matrix I am considering does not have any special form, except that all its entries are real numbers. I have considered the expokit package, but was wondering if there is anything faster out there. > > Thank you very much, Well, you might dig up a copy of the paper "19 Dubious ways to Compute the Exponential of a Matrix". In fact, there is a reprise to that paper. Both were written by some fellow has a vague relation to matlab too. The point being, while there are many ways to compute a matrix exponential, that choice which is embodied in expm is arguably the best one, chosen by the fellow who wrote the book on it. John
From: Bobby Cheng on 3 May 2010 09:47 Depending on the size of the matrix, the dominant cost in the algorithm is matrix multiply. The implementation of expm.m is actually one of the few examples that is migrated from C implementation to MATLAB implementation. This happened a few release ago. The speed comes from optimal choice of number of matrix multiply performed. Having said that if the matrix size is like 5-by-5 and you want to do it over a million times, the MATLAB implementation is not as fast as before, but it does give you correct answer more often. If your problem can be solved by a simpler algorithm correctly, try "type expmdemo1" to see the previos algorithm that MALTAB uses. It is not hard to covert to a mex-file. ---Bob. "John D'Errico" <woodchips(a)rochester.rr.com> wrote in message news:hrmc21$mup$1(a)fred.mathworks.com... > "Raul " <ragonzal(a)alum.mit.edu> wrote in message > <hrmaop$at$1(a)fred.mathworks.com>... >> Hi All, >> >> I was wondering if anyone out there knows a fast alternative to the >> matrix exponential function expm. Perhaps there is a mex file out there >> somewhere? The matrix I am considering does not have any special form, >> except that all its entries are real numbers. I have considered the >> expokit package, but was wondering if there is anything faster out there. >> >> Thank you very much, > > Well, you might dig up a copy of the paper "19 Dubious > ways to Compute the Exponential of a Matrix". In fact, > there is a reprise to that paper. Both were written by > some fellow has a vague relation to matlab too. > > The point being, while there are many ways to compute > a matrix exponential, that choice which is embodied in > expm is arguably the best one, chosen by the fellow who > wrote the book on it. > > John >
|
Pages: 1 Prev: Conversion from narxsp to parallel form Next: Create DLL from MATLAB for use in FORTRAN |