Hello,
While debugging a DSP algorithm, I realized the problem is duo to the CMSIS matrix inverse function: arm_mat_inverse_f32. It's really strange and is driving me crazy. arm_mat_inverse_f32 returns the right result for some Matrices but wrong result for some other! I assure you the matrices are not singular or anything like this, the algorithm works just fine with the same input data on MATLAB. I have no idea what the problem could be, any suggestions?
Regards
Without having time to try to run your code, I get interested about one thing.
Your declaration of an array is as a one-dimensional array of SIZE*SIZE entries. Are you sure that your sequence of numbers correlates correctly with the row and column order of the matrice, so that when you test to invert the matrix yourself you are working with the same matrix values as you send to arm_mat_inverse_f32()?
That's what I thought at first, but it doesn't even matter, since I tried multiplying the inverse matrix to the original using "arm_mat_mult_f32" function. Again only the first set of data results in Identity matrix! Any matrix multiplied by it's inverse should result the Identity matrix.
Never mind...I found out what's the problem. A stupid mistake by me! sorry for the waste of time.
A stupid mistake by me! sorry for the waste of time.
It would be less of a waste if you told what that mistake actually was. As-is, nobody but you learned anything from this exercise, so it would be quite an improvement if future readers were to find a "Don't do ...this..., because it won't work" kind of lesson in this place.
absolutely spot on.