#include "simplex.h"
#define until(x) while (!(x))
int np, maxiter, niter;
FILE *fpdata;
extern void sum_residual();
sfit()
{
register int i, j, done;
double *center, *p, *q;
center = (double *)malloc((unsigned)N*sizeof(double));
p = (double *)malloc((unsigned)N*sizeof(double));
q = (double *)malloc((unsigned)N*sizeof(double));
/* First Vertex */
sum_residual(simp[0]);
/* Compute offset of Vertices */
for (i=0 ; i maxerr[j])
done = 0;
}
} until(done || (niter == maxiter));
/* Average Each Parameter */
for (i=0 ; i
|