[SOLVED] Matrix division
-
wrote on 20 Aug 2014, 10:34 last edited by
Hi,
I'm trying to calculate the division between to matrix. I start usin Qgenericmatrix, but i found the trouble that is not possible to create a dynamic size matrix.
So, Does anybody know any library or some suggestion to calculate matrix divisions with dynamic sizes???
Thanks for help,
avmg -
wrote on 20 Aug 2014, 11:24 last edited by JohanSolo
First, there is no such operation as matrix division. What you can do is multiply by the matrix's inverse, assuming it exists.
Matrices with an existing inverse are squared and their determinant is non-zero (see general linear group). This leads to the fact that the inverse (when it exists) has the same dimension. Therefore I don't see why you want a dynamic size... What you can do is a partial specialisation of the QGenericMatrix class, with equal number of columns and rows, add a check for the determinant and an invert method.
-
wrote on 20 Aug 2014, 11:40 last edited by
Hi,
Yes i know the theory, but i just ask if there's any library to do it (matrix inverse, product...) About the dynamic size, i have data from sensors and the matix size depend on the sensor. I have other solutions, but i searched and ask to find a good one.
Thanks for reply!
-
wrote on 20 Aug 2014, 12:00 last edited by
I just found now armadillo library, Any experience in comparison with the boost mentioned above?
Thanks
-
wrote on 20 Aug 2014, 12:07 last edited by
I don't know this library.
Apparently it relies on lapack which is existing for a long time, and thus quite reliable. They say the API is matlab like, which I personally am not found of, but may mean that it is more user-friendly that boost's.Boost heavily relies on templates, which cause the syntax to be kind of cumbersome and obscure at first glimpse.
-
wrote on 20 Aug 2014, 12:11 last edited by
I found also a performance test comparing diferent libraries and the armadillo looks like one of the bests, so i will try it.
Ok thanks so much for help me!
1/7