/* tpplsq.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ /* Test: pplsq */ #include "ccmath.h" #define ND 100 #define NP 5 double x[ND],y[ND]; void main(void) { double dx,z; /* set dimensions of arrays used by plsq for output */ double bc[NP]; int n,np,j; printf(" Test of Polynominal Least Squares\n"); /* set number of input points */ n=ND; /* The test fit inputs are the values of a polynominal of degree 4, defined in this loop. */ for(j=0,dx=.1; j