inst/snippet/orthonormal-s1.R

x <- c(1,1,1)
y <- c(1,1,-2)
w <- y - project(y,x)
dot(x,w)                                    # confirm normality
# these two column vectors are orthogonal and have correct span
cbind( x / vlength(x), w / vlength(w) )

Try the fastR package in your browser

Any scripts or data that you put into this service are public.

fastR documentation built on May 2, 2019, 5:53 p.m.