function [Q,R]=qrhs(A)
% QR Decompostion by using Householder Method
n=size(A,1);
R=A;
Q=eye(n);
for i=1:n-1
    x=R(i:n,i);
    y=[1;zeros(n-i,1)];
    Ht=householder(x,y); % calling the householder function
    H=blkdiag(eye(i-1),Ht); %Block diagonal concatenation with new Ht
    Q=Q*H; %Orthogonalize Q incrementally
    R=H*R; %Generate R
    figure; matrixplot(Q);
end