% P2
% Checks out Grow

  randn('seed',0)
  n = 10;
  T = triu(randn(n,n));
  T(1,1) = .001;
  d = randn(n-1,1);
  d = d/norm(d);
  y = T(2:n,2:n)\d;
  
  [yp,dp] = Grow(T,y,d);
  
  clc
  fprintf('norm(y)  = %10.2e\nnorm(yp) = %10.2e\n',norm(y),norm(yp))
  fprintf('norm(dp) = %10.2e\n',norm(dp))
  fprintf('norm(T*yp - dp) = %10.3e\n',norm(T*yp - dp))
  yp = yp
  dp = dp