| Library: | math |
| See also: | plotgt orthonormal mat2rot |
| Quantlet: | rot2mat | |
| Description: | Computes an orthonormal matrix from a set of Givens rotations. |
| Usage: | out = rot2mat (in {, d}) | |
| Input: | ||
| in | p x (p-1)/2 vector | |
| d | p x 1 vector | |
| Output: | ||
| out | p x p matrix | |
; loads the library math
library ("math")
randomize(0)
; loads the library xplore
library("xplore")
; generate some orthonormal matrix
x = normal(6,6)
; orthonormalize x
o = orthonormal(x)
; compute givensrot
{out, d} = mat2rot(o)
rot = rot2mat(out, d)
; check it
d.*rot-o
gives the null matrix
| Library: | math |
| See also: | plotgt orthonormal mat2rot |