Program runsvd(input,output);
{dr04.pas == driver for singular value decomposition and least squares
          solution using row-wise entry of data

          Modified for p5x

          Copyright 1988, 1990 J.C.Nash
}

const
   banner = 'dr04.pas -- run Algorithm 4 problems -- Givens'' reduction, svd and least squares soln';

#include "common.inc.pas"  // constants, types & procedures
#include "calceps.pas"   // compute machine precision
#include "getobsn.pas"   //allowsentryofanobservation(rowofproblem)
#include "alg04.pas"     // Nash SVD by column rotations

{main program}
var
  i, j, k, m, n, nRHS : integer; {order of problem, number of right hand sides}
  Vtranspose : rmatrix;
  rssvec : rvector;  {to hold the residual sum of squares}
  svs : rvector; {to hold the singular values}
  B : rmatrix; {the matrix of least squares solutions }
  A : rmatrix; {needed only for svdtst}
  fail, sym : boolean;
  t1: real;

begin
  startup;
  GivSVD( n, nRHS, B, rssvec, svs, Vtranspose, m);
  {local files auto closed when procedure ends}
end. {dr04.pas == Givens' reduction, svd and least squares soln}
