|
Forum Index : Microcontroller and PC projects : Matrix Inversion and Determinants
| Author | Message | ||||
| William Leue Guru Joined: 03/07/2020 Location: United StatesPosts: 405 |
Our excellent MATH firmware has some useful matrix and vector operations but does not currently have matrix inversion or determinant computation. I needed these for a project, so I wrote routines to do both determinants and matrix inversion. I enclose my test program here. Please don't mistake this for a robust, high-tech library routine! I do test for singular matrices before computing the inverse (using the determinant) but many other things can go wrong if your matrix is "ill-conditioned", which can mean any of several different problems, including "almost singular"; that is, having a non-zero but extremely small determinant. The Gauss-Jordan Elimination algorithm that I use is known to be numerically unstable for ill-conditioned matrices. Enjoy! -Bill Math_Matrix_Inversion.zip |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |