- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, with all the usual warnings....
Here's a piece of code I've been using for quite some time.
Usage is simple;
Call QRinv( A, Ai )
where A is the matrix you want inverted and Ai is the output inverse. Remember to allocate Ai before calling if it is dynamic.
Feel free to askif the code comments aren't sufficient.
Cheers, Cliff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anthony,
it really depends on what type of matrix you're going to invert. If it is well-conditioned try IMSL (or equivalent) LU decomposition like DLINRG (allows you to re-use the space of original matrix what can be nice if the size is a problem and you don't need the original), or generalized version DLSGRR. The latter is suited for ill-conditioned problems as it first decomposes matrix using SVD so you can handle problem of matrix singularity. Naturally, it makes it slower. If you don't have IMSL youshould find that sort of routines at Netlib. Definitely you'll find it in Numerical Recipes. I remember Jugoslav once pointed to some source code for generalized inverse, so try to search this forum on this as well.
A.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page