×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# lapack for eigen values

## lapack for eigen values

(OP)
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

### RE: lapack for eigen values

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
http://newtonexcelbach.wordpress.com/

### RE: lapack for eigen values

(OP)
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 http://www.netlib.org/lapack/double/dsgesv.f). 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.

### RE: lapack for eigen values

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:
http://docs.scipy.org/doc/scipy/reference/tutorial...

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
http://newtonexcelbach.wordpress.com/

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!