Registered Member
|
Dear all,
I found that array1.pow(exponent) can be done. But I need to perform the analogous operation on a vector. For example: VectorXd a(x), b(x), c(x) ; a = scalar * b * c.pow(0.75); If this can also be done, could you please point that out ? Thank you. |
Moderator
|
You view any vector/matrix as an array using the .array() method, e.g.:
a = scalar * b .array() * c.array().pow(0.75); .array() cost nothing, it only changes the semantic/API. |
Registered Member
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]