MATLAB Code for funtion rmat

used by function hqrbp2

function [H]=rmat(A,u,gama);
% This function computes the product of a reflector matrix with a
% rectangular matrix.  The reflector is of the form H=Q-v*v' where v is a column vector.
% NOTE the product is of the form A*H, where Q the first
% column of Q is zero and the others form an identity matrix.
% A is (q-1)*p and H is p*q
% HvB/USC/Spring 97

[m,n]=size(A);nn=n+1;
v=u(2:nn)./gama;

H=-(A*v)*u';
H(1:m,2:nn)=H(1:m,2:nn)+A;

The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees