Library: | math |
See also: | plotgt orthonormal rot2mat |
Quantlet: | mat2rot | |
Description: | Decomposes an orthonormal matrix into a set of rotation matrices. |
Usage: | {out, d} = mat2rot(in) | |
Input: | ||
in | p x p matrix | |
Output: | ||
out | p x (p-1)/2 vector | |
d | p x 1 vector |
; loads the library xplore library("xplore") ;loads the library math library("math") ; generate some orthonormal matrix x = normal(6,6) ; orthonormalize x o = orthonormal(x) ; check it o'*o ; compute givensrot {out, d} = mat2rot(o) out
gives the appropriate (6x6) identity matrix and shows the angle of the appropriate rotations