   function [x] = hoLS(A,b) 
%% Function [x] = hoLS(A,b) 
%% solves LS problem :  min || b -Ax|| 
%% using  householder factorization. 
%% 
[m,n] = size(A);
%%-------------------- calls hoQR
[Z,beta] = hoQR(A);
%%-------------------- apply Householder transforms
y = hoApp(Z,beta,b) ;
%%-------------------- solve upper triangular syst
x = backsolv(Z(1:n,1:n), y(1:n));

