AceInfinity
Emeritus, Contributor
Ace, the method I showed for 2x2 will work with any size, square matrix. See post #6 for the algorithm I developed to do the same steps in for loops for any matrix height matH. You just recursively update each row after getting rid of the upper and lower diagonal portions of it.
By the way, you should take the determinant of the matrix to make sure an inverse exists prior to trying to actually calculate the inverse.
I already did that earlier today (this morning). My class is much extended now: Matrix Operations - Helper Class
I just haven't updated it here.
I'll see what I can do, I don't really like the way you did it though lol, I like my multi-dimensional arrays.
edit: Actually, It seems I already had that implemented yesterday night with IsSingular().
03-04-2013, 09:58 PM (This post was last modified: Yesterday 05:12 AM by AceInfinity.)
*Updated: 10/03/2013
Once I get the Inverse working though I want to get rid of all that static crap I have going on, and make everything internal to that instance. No sense in static since a Matrix object needs to be instantiated anyways to use most of those methods.
Last edited: