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

Rotate a matrix in Eigen

Tags: None
(comma "," separated)
kuantingy
Registered Member
Posts
1
Karma
0

Rotate a matrix in Eigen

Tue Nov 19, 2013 2:32 am
Is there a function that supports rotating matrix 90 degrees, similar to rot90 in matlab?

Input:
1 2 3
4 5 6
7 8 9

Output:
3 6 9
2 5 8
1 4 7
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Rotate a matrix in Eigen

Tue Nov 19, 2013 10:47 am
yes:
Code: Select all
B = A.transpose().colwise().reverse();


Bookmarks



Who is online

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