Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
Jul 15, 2003
Messages
114
Location
US
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.
 
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.

Similar threads

Part and Inventory Search

Sponsor

Back
Top