tags:

views:

134

answers:

1

Erm. I hope I am seriously overlooking something. I want to rotate a 2d vector (kartesian) v by a certain angle phi.

I can't find a function that generates the appropriate matrix or just performs that function.

I know how to do this by hand. I am looking for a ublas utility "something" that does this for me.

+1  A: 

BLAS == Basic Linear Algebra Subroutines, emphasis on the basic. The BLAS functions are extremely general, they don't have anything nearly as specific as 2D vector rotations. Just do it manually: make your own function that builds a

[cos phi,-sin phi
 sin phi, cos phi]

matrix and multiplies it with your vector.

tzaman
actually, functions to generate and apply rotations are in blas, to use with givens rotations
aaa