% P1
  disp(' ')
  disp('*************************************')
  disp(' ')
  disp(' Problem 1')
  disp(' ')
  
  disp('An r = 5 example...')
  
  format long
% Generate example...
  randn('seed',0)
  m = 10;
  r = 5;
  W = randn(m,r);
  Y = randn(m,r);
  b = randn(m,1);
  
% Obtain a basic solution
  xBasic = LowRankLS(W,Y,b)
  resBasic = norm((W*Y')*xBasic - b)
  
% Find SVD solution and compute norm of residual...
  [U,S,V] = svd(W*Y');
  xLS = zeros(m,1);
  for k=1:r
    xLS = xLS + ((U(:,k)'*b)/S(k,k))*V(:,k);
  end
  resLS =    norm((W*Y')*xLS - b)

  
