Use MATLAB for any coding Let x 9 2 6T Find the Householder

Use MATLAB for any coding

Let x = [9, 2, 6]^T. Find the Householder reflection H that transforms x into H_x = [-11 0 0] Find nonzero vectors u and v that satisfy H_u = -u H_v = v

Solution

a)function u = house_gen(x)

We want to operate on the columns of a matrix to introduce zeros below the diagonal. Let\'s begin with the first column, call it x. We want to find u so that Hx = H(u,x) is zero below the first element. And, since the reflection is to preserve length, the only nonzero element in Hx should have abs(Hx(1)) == norm(x). now use the below code to get the reflection.

function Hx= house_ref(u,x)

end;

b) for this function to implement we need M matrix . M R n×n is symmetric and positive definite, so that M defines an inner product <x, y>(subscript)m = y (transpose)Mx and an associated norm ||x||(subscript)m = sqrt(<x,x>)(subscript)m.

Your code should look like function

function y = p4applyH(Mu,u,x)

% Inputs: % u = nonzero length n real vector

% Mu = M*u % Output:

% y = H*x where H is the generalized reflector for u

where H is the generalized reflector for u

Use MATLAB for any coding Let x = [9, 2, 6]^T. Find the Householder reflection H that transforms x into H_x = [-11 0 0] Find nonzero vectors u and v that satisf

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site