Reputation: 87
** Edited **
I tried changing the mentioned Jacobi algorithm to fixed point using libfixmath but I am not getting right results. What did I miss??
C newbie here. I somehow got my self in the deep and i cant find my way out. If you could help that would be awesome!
The situation: I am trying to implement an ICA algorithm in C. I did so using floating point arithmetic (double, float). Now I want this code to transform it to fixed point so I can import it on an ARM microcontroller of 32 bits (thats why i cant use double, float etc).
I have found four libraries that I think can help me:
I didnt use 1. 2. or 3. I am currently trying libfixmath because allmost all calculations are done with matrices.
My problem is when trying to find the eigenvalues and eigenvectors of a covariance matrix (positive symmetic 3x3 matrix). I searched around for libs or functions that do eigendecomposition or SVD etc. but i didnt find anything.
How to you do that sort of calculation in fixed point?? Are there any functions/libs that i didnt find out? Do I have to alter the eigen function that I have in floating-point (line by line converting to fixed point - i.e fix16_from_dbl() )?
My current eigen function (not mine of course i think it is from Numerical Recipes)
Other relevant question: Here's StackOverflow fixed SVD
****Is my first question if there is anything to correct in my question please say so....dont eat me alive! :)
** Edited **
libfixmath does Cholesky1, wiki2 and QR decomposition.
I tried to play with maths and produce the eigenvectors or eigenvalue of a matrix with this data (data from the above functions) but I failed.
If anyone knows how to do that then problem solved.
*Should I post it to math stack website?
1 http:// rosettacode.org/wiki/Cholesky_decomposition
2 http:// en.wikipedia.org/wiki/Cholesky_decomposition#The_Cholesky.E2.80.93Banachiewicz_and_Cholesky.E2.80.93Crout_algorithms
Upvotes: 2
Views: 1721
Reputation: 3923
How about the GNU Scientific Library? It has a number of functions related to eigenvalue decomposition
You could use something like IQMath in order to convert from floating-point to fixed-point. There are also a number of answers for a similar question here
Upvotes: 1