annotate rDiff/src/locfit/Source/lfev.c @ 1:08d3a6143873

Deleted selected files
author vipints
date Tue, 08 Oct 2013 06:54:25 -0400
parents 0f80a5141704
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
1 #include "local.h"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
2
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
3 int lf_error;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
4
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
5 lfit lf;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
6 design des;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
7
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
8 void calllf(x,y,n)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
9 double *x, *y;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
10 int n;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
11 { lfdata *lfd;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
12 fitpt *fp;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
13 int i;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
14
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
15 lfit_init(&lf);
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
16
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
17 lfd = &(lf.lfd);
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
18 lfd->x[0] = x;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
19 lfd->y = y;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
20 lfd->n = n;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
21 lfd->d = 1;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
22
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
23 startlf(&des,&lf,procv,1);
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
24 // startmodule(&lf,&des,"std",0);
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
25
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
26 fp = &lf.fp;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
27 for (i=0; i<fp->nv; i++)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
28 printf("%8.5f %8.5f\n",evptx(fp,i,0),fp->coef[i]);
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
29 }
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
30
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
31 int main()
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
32 { double x[10], y[10];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
33
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
34 x[0] = 0; x[1] = 1; x[2] = 2; x[3] = 3; x[4] = 4;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
35 x[5] = 5; x[6] = 6; x[7] = 7; x[8] = 8; x[9] = 9;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
36
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
37 y[0] = 0.3692449; y[1] = 0.8194270;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
38 y[2] = 1.6363139; y[3] =-0.9969944;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
39 y[4] = 0.5359200; y[5] = 1.8642622;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
40 y[6] = 0.3568127; y[7] = 0.4746753;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
41 y[8] =-2.0038246; y[9] = 1.6636109;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
42
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
43 calllf(x,y,10);
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
44 }