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

Matlab-style cross product

Tags: eigen eigen eigen
(comma "," separated)
aerobiomat
Registered Member
Posts
1
Karma
0

Matlab-style cross product

Thu Oct 24, 2013 11:34 am
Hello.

I'm porting some Matlab code to C++ using Eigen.
I have two 3xN matrices, A and B, where each column represents a vector. I need to calculate a third 3xN matrix, C, where each column is the cross product of the corresponding columns in A and B.
In Matlab I can get this using cross):
Code: Select all
C = cross(A, B)

Is there any way to do something similar with Eigen without using the obvious for loop?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Matlab-style cross product

Thu Oct 24, 2013 6:41 pm
nope, but feel free to add a feature request in our bugtracker (http://eigen.tuxfamily.org/bz/). I guess it should be implemented through the colwise/rowwise proxy to tell whether we should consider column or row vectors, but then we have to discuss to see whether this is consistent with the already existing A.colwise().cross(v) where A is a matrix and v a vector....


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]