This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CMSIS Matrix inverse returns singular for nonsingular matrices

Hi

I have been testing the CMSIS DSP matrix inverse function and am observing unexpected results. In particular, the function arm_mat_inverse_f32 returns ARM_MATH_SINGULAR for matrices that are clearly not singular. For example, a 4x4 identity matrix (ones on the diagonal, zero everywhere else) returns a singularity error.

Is this expected behaviour? Is there a way to improve this?

Thanks!

Markus

  • Hello Markus,

    Would you mind telling me the version # at the top of the file arm_mat_inverse_f32.c that you are using?  I'll then attempt to reproduce your situation and find a solution.

    Dan

  • Hi Dan

    thanks for getting back to me. The file arm_mat_inverse_f32.c is Revision V1.4.3 (Date: 12. March 2014). Please note that I am not compiling this file but including the precompiled library (libarm_cortexM4lf_math.a) that is included with CMSIS (CMSIS-SP-00300-r4p1-00rel0).

    Thanks

    Markus

  • Hi Markus,

    Just a heads up.  I have reproduced the issue.  We're trying to think of an elegant solution to it now.  When there's a fix, I will post the update file here as well as make sure it ends up in the next release of CMSIS.  If you have any suggestions for fixes, feel free to post them.

    Dan

  • Hi Markus,

    I have an updated version that should resolve the issue.  I checked for the identity case, as well as ran it through our normal test (which previously didn't check for diagonal matrices) and it passed.  It might get changed again before it hits the next CMSIS release, but hopefully this will work for you for now.

    Dan