Large scale generalized eigenvalue problem involving dense symmetric positive-definite matrices

Hi all,
I need to solve a generalized eigenvalue problem [A][x]=[B][x][lambda]; where [A] and [B] are positive definite matrices and the resulting [x] should be normalised as [x'][B][x]=[I]; [I] = Identity matrix.
Uptil now, I was using the following commands to solve the problem on a 32-bit computer satisfactorily
L = chol(B);
CL = (inv(L))*A*(inv(L))';
make_mswindows
[v1,r1] = syev(CL,'qr');
eigvector = (inv(L))'*v1;
eigvalue = sqrt(r1);
Here, syev is a function from the MATLAB wrapper for LAPACK (available at <ftp://ftp.netlib.org/lapack/lapwrapmw/index.html>).
But now that I have switched over to a 64-bit workstation, I am getting NO COMPILER error. I reckon that I have to make changes in the mex-code files which I am not able to do.
Is there any other way to this problem? Can we solve the generalized eigenvalue problem by any other method, efficiently. It should be noted that the size of matrices A and B is quite big (200-800 and even more).
Regards, N. Madani SYED

1 Kommentar

When you say you are getting "NO COMPILER" error, do you mean that you are getting an error indicating that you have not set up a compiler, or do you mean that the code compiles without error message?

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Perhaps the simple lapack wrapper would do, http://www.mathworks.com/matlabcentral/fileexchange/16777
This does require mex, which requires that you have installed appropriate compilers for your platform and MATLAB version, such as the ones listed at http://www.mathworks.com/support/compilers/R2011b/win64.html

3 Kommentare

I downloaded the simple lapack wrapper as suggested and tried running the program, but I am getting the following error. Would you please have a look at it?
The function 'lapack' requires a compiled mex version, create now? (Y/n): Y
Error lapack.c: 50 syntax error; found `*' expecting `)'
Error lapack.c: 50 skipping `*' `funcI'
Error lapack.c: 51 illegal return type `int function(pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void,pointer to void)'
C:\MATLAB7\BIN\WIN32\MEX.PL: Error: Compile of 'lapack.c' failed.
??? Undefined function or variable 'exception'.
Error in ==> lapack at 122
catch exception
Regards
Which compiler are you using for this? If you use
mex -setup
what did you select?
I would tend to associate that error with the WATCOM C compiler being very old, but that compiler would only be used for 32 bit MATLAB.
Dear Roberson,
The lapack wrapper is now working all right. Thanks a million for your help.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

You could use eig in place of syev. Or, if you don't need the normalization, you could solve the generalized eigenvalue problem directly using
[eigvector,eigvalue] = eig(A,B)

Kategorien

Mehr zu Linear Algebra finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by