Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:06 17 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Matrix Inversion and Determinants

Author Message
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 405
Posted: 04:50pm 11 Jan 2021
Copy link to clipboard 
Print this post

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
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025