This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Exponent of the matrix

Tags: None
(comma "," separated)
donnss
Registered Member
Posts
7
Karma
0

Exponent of the matrix

Sun Apr 03, 2016 12:56 pm
I have a matrix mat of type Matrix<double, Dynamic, Dynamic>. Is there a way to return the same size matrix whose elements are the result of element wise exponent of the mat matrix? I need like this: resultMatrix = exp(mat).
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Exponent of the matrix  Topic is solved

Mon Apr 04, 2016 9:30 am
Yes, you have to move the "array" world, e.g.:

res = mat.array().exp();

or

res = exp(mat.array());


See: http://eigen.tuxfamily.org/dox-devel/gr ... Class.html


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient