Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

lapack for eigen values

Status
Not open for further replies.

rk_19

Structural
Aug 7, 2012
71
hi, i have problem of the form AX=lamda.BX and wish to get the eigen values for this.. A and B are 2 symmetric square matrices. i am trying to use lapack routines in fortran95 on win64 pc. the matrices A and B are prepared in the program from certain calculations..as per the routine, A and B are to be in Upper or lower triangular form - how do i achieve my existing matrices in this format.

thanks,
rkr
 
Replies continue below

Recommended for you

I haven't used LAPACK directly, but the Python Scipy library includes functions that call the LAPACK functions directly, and many other higher level functions for linear algebra and matrix manipulation. Although requiring another level of code, this library does provide a convenient and well documented way of accessing the LAPACK functionality.

If you are interested in the Python/Scipy approach, you might like a look at my spreadsheet at:
xlScipy with xlwings


Doug Jenkins
Interactive Design Services
 
hi, understand that py has options, currently my program is written in fortran and its not easy (or i actually dont want to put all that into py now) to migrate. i have successfully prepared the matrix A and B which are waiting to get processed via lapack. i am struggling how to get them into traingular format as requested by the lapack routine (dsgev - refer link i have copied the matrices and tested in mathcad, and i get the expected eigen values in that. this was verified by a different program also. so, i am sure that the matrices A and B generated in fortran have definite eigen values... anyways, thanks for your comments.
 
First thanks for the prompt to look at the LAPACK site, which I had overlooked up till now (or maybe had a quick look and rapidly moved on).

Having recently spent a couple of weeks trying to get F2PY (Fortran to Python) running, after changing from Python 2 to 3, I can certainly empathise with the reluctance to use another language, nonetheless I think it's worth you having a look at the Scipy documentation, as their linear algebra routines seem to be simply a front end to LAPACK, and the manual does have a fair bit of background information on matrix formats. The link below may (or may not) be of some use:

Regarding the specific question, the comments for dsgesv that you provided refer to:
A (input/output) DOUBLE PRECISION array,dimension (LDA,N)
* On entry, the N-by-N coefficient matrix A.
and
B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
* The N-by-NRHS right hand side matrix B.

So it doesn't seem to say anything about A and B being in upper triangular form, or am I missing something?

Doug Jenkins
Interactive Design Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor