% P2
% Tests LSUpdate

  randn('seed',0)
  rand('seed',0)
  m = 20;
  n = 10;
  A = randn(m,n);
  [Q,R] = qr(A);
  b = randn(m,1);
  beta = randn;
  c = randn(n,1);
  theta = rand;

  
  clc
  format long
  x = LSUpdate(Q,R,b,beta,c,theta)
      