Compute Householder reflection vector housv to reflect x to be the j-th column of identity, i.e.,
(I - beta*housv*housv')x = norm (x)*e(j) if x(j) < 0, (I - beta*housv*housv')x = -norm (x)*e(j) if x(j) >= 0
Inputs
vector
index into vector
threshold for zero (usually should be the number 0)
Outputs (see Golub and Van Loan):
If beta = 0, then no reflection need be applied (zer set to 0)
householder vector
Package: octave