Description Usage Arguments Details Value Author(s) Examples
Generate a 3x3 orthogonal matrix using the Gram-Schmidt algorithm.
1 | GramSchmidt(v1, v2, v3, order = 1:3)
|
v1, v2, v3 |
Three length 3 vectors (taken as row vectors). |
order |
The precedence order for the vectors; see Details. |
This function orthogonalizes the matrix rbind(v1, v2, v3)
using the Gram-Schmidt algorithm. It can handle rank 2 matrices
(returning a rank 3 matrix). If the original is rank 1, it is likely
to fail.
The order
vector determines the precedence of the original
vectors. For example, if it is c(i, j, k)
, then row i
will be unchanged (other than normalization); row j
will
normally be transformed within the span of rows i
and j
.
Row k
will be transformed orthogonally to the span of
the others.
A 3x3 matrix whose rows are the orthogonalization of the original row vectors.
Duncan Murdoch
1 2 3 4 5 6 7 |
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE
3: .onUnload failed in unloadNamespace() for 'rgl', details:
call: fun(...)
error: object 'rgl_quit' not found
[,1] [,2] [,3]
[1,] -0.3722391 -0.2810744 0.6572835
[2,] 0.7737364 2.1018446 1.4526077
[3,] 2.8455723 1.1114047 0.8868566
[,1] [,2] [,3]
v1 -0.4618527 -0.3487408 0.8155194
v2 0.3063399 0.8001563 0.5156605
v3 0.8323748 -0.4879854 0.2627211
[,1] [,2] [,3]
[1,] -0.7480716 1.3547163 0.00000000
[2,] 1.0000000 0.0000000 0.00000000
[3,] 0.1812679 -0.6844128 0.02757329
[,1] [,2] [,3]
v2 0 1 0
v1 1 0 0
v3 0 0 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.