Registered Member
|
I'm sorry, I am new to c++. I try to use from the beginning the Eigen Bib and I have to use a arcsin and arccos function to a MatrixXd.
How can I do that? Thanks |
Registered Member
|
We don't provide a built-in function for that, but we provide a way to apply any function to a matrix, you just have to wrap that function into a "functor' object, see:
http://eigen.tuxfamily.org/dox/classEig ... 045c8a2e9e
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
Thanks a lot bjacob, for your response and for sharing this very ambitous project.
I managed to get this working by learning and stealing from more experienced users . I'll post the code for all the other c++ newbies which are confronted with the same basic problems then me. 1. In the main.h I added the following lines:
2. In the FunctorsAddons.h it's:
Feel free to add more functions from the std bib. 3. In the CwiseAddons.h it's:
One can call these functions then in the main.cpp by:
Hf! |
Registered Member
|
Excellent, I'll be pointing people to your tutorial. Thanks for sharing it!
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, sandyvee