Prev: Inline LaTeX Equations in HTML Publish...
Next: mathematical formula or formulas used in newfftd()
From: Minwoo on 14 Mar 2010 23:53 I'm trying to get the number of multiplication in general eigenvalue problem (eig fuction in Matlab). I'm not sure about the exact algorithm for 'eig' function in Matlab so if somebody knows what the algorithm is and how muh multiplications in there, please let me know. Thanks, in advance.
From: James Tursa on 15 Mar 2010 02:50 "Minwoo " <cmw0321(a)gmail.com> wrote in message <hnkav1$80h$1(a)fred.mathworks.com>... > I'm trying to get the number of multiplication in general eigenvalue problem (eig fuction in Matlab). I'm not sure about the exact algorithm for 'eig' function in Matlab so if somebody knows what the algorithm is and how muh multiplications in there, please let me know. > Thanks, in advance. There is probably no way to get this info, since the eig function calls LAPACK routines in the background to do the work, and these LAPACK routines are part of a precompiled library from a third party vendor that MATLAB contracts with. e.g., see the following: doc eig If you want to get a *general* idea of the calculations involved, then you could pick a case and go to netlib.org to look at some sample Fortran source code. e.g., for the double precision real symmetric case, MATLAB calls the LAPACK routine DSYEV according to the doc. So then you could look at some sample source code for this here: http://netlib.org/lapack/double/dsyev.f You could count the number of operations yourself from this code (and code that it calls) to get a representative number. That being said, I have no idea how close this number would be to the actual number from the highly optimized third party library that MATLAB uses. James Tursa
From: Steven Lord on 15 Mar 2010 10:20 "Minwoo " <cmw0321(a)gmail.com> wrote in message news:hnkav1$80h$1(a)fred.mathworks.com... > I'm trying to get the number of multiplication in general eigenvalue > problem (eig fuction in Matlab). Why? How are you planning to use that information? -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: Minwoo on 15 Mar 2010 11:47 "Steven Lord" <slord(a)mathworks.com> wrote in message <hnlfnv$3lc$1(a)fred.mathworks.com>... > > "Minwoo " <cmw0321(a)gmail.com> wrote in message > news:hnkav1$80h$1(a)fred.mathworks.com... > > I'm trying to get the number of multiplication in general eigenvalue > > problem (eig fuction in Matlab). > > Why? How are you planning to use that information? > > -- > Steve Lord > slord(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ > I want to calculate computation cost according to the size of the matrix (I'm calling it as a model order). If I can get that, then it would be possible to justify the optimized condition or maximum model order for my program. I tried to follow QR algorithm to get that, but QR algorithm is not enough for complex eigenvalues and eigenvectors. Thanks for your concern
From: James Tursa on 15 Mar 2010 13:01 "Minwoo " <cmw0321(a)gmail.com> wrote in message <hnlkq9$p8n$1(a)fred.mathworks.com>... > "Steven Lord" <slord(a)mathworks.com> wrote in message <hnlfnv$3lc$1(a)fred.mathworks.com>... > > > > "Minwoo " <cmw0321(a)gmail.com> wrote in message > > news:hnkav1$80h$1(a)fred.mathworks.com... > > > I'm trying to get the number of multiplication in general eigenvalue > > > problem (eig fuction in Matlab). > > > > Why? How are you planning to use that information? > > > > -- > > Steve Lord > > slord(a)mathworks.com > > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ > > > > I want to calculate computation cost according to the size of the matrix (I'm calling it as a model order). If I can get that, then it would be possible to justify the optimized condition or maximum model order for my program. I tried to follow QR algorithm to get that, but QR algorithm is not enough for complex eigenvalues and eigenvectors. > > Thanks for your concern If you just want a timing cost then why not just set up some tests and time the results for various sizes? That is likely to be more useful than counting operations anyway, since just counting operations per my previous post doesn't take into account the actual LAPACK coding scheme used, effects of cache memory, etc. etc. James Tursa
|
Pages: 1 Prev: Inline LaTeX Equations in HTML Publish... Next: mathematical formula or formulas used in newfftd() |