Calculate a rotation matrix

1 | ```
rotmat(alpha = 0, ndim = 2, dim1 = 1, dim2 = 2)
``` |

`alpha` |
rotation angle (in rad) |

`ndim` |
number of dimensions |

`dim1,dim2` |
the plane in which the rotation should take place |

The rotation will take place in the plane spanned by
dimensions `dim1`

, `dim2`

. All other directions
are left untouched.

Matrix-multiplying `ndim`

-dimensional points with
the rotation matrix rotates the points `alpha`

radians clockwise, see the example.

matrix of size (`ndim`

x `ndim`

),

Claudia Beleites

1 2 3 4 5 6 7 8 9 10 11 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.