Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Matrix math with complex numbers

Status
Not open for further replies.

ePOWEReng

Electrical
Jul 15, 2003
114
Hello,

I am considering taking some calculations that presently performed using MathCAD and creating an application to perform those calculations instead. The calculations involve creating a matrix of complex numbers and performing some matrix math operations to arrive at the solution. The complex matrices will be up to 200x200 in size and matrix inversion will be required. My question is what development platform would make be the easiest to implement a program like this in? Are there libraries out there for performing complex matrix inversion? Maybe add-ons that are useful? I was considering using the microsoft visual platform...

Thanks for your input and suggestions.
 
Replies continue below

Recommended for you

I recently converted some functions from Matlab into C++, using a complex matrix class of my own. Having implemented the inverse using gaussian elimination, I found it far too slow to be practical (though fun to implement).

So I ended up using routines from lapack (ZGETRF and ZGETRI). This involved copying my data out of the matrix into a regular C array in a presribed order, passing it to each of those lapack routines, then copying the result back into my matrix. The result was orders of magnitude faster, even with all the copying.

This was done on HP-UX, Linux and Windows.

My advice is to use lapack/blas as your matrix inversion engine.

- Steve
 
If inversion is only required for solving simultaneous equations, you might be better off using Choleski LU decomposition. It is about 5 times faster.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor