/[ascend]/trunk/models/johnpye/leastsq.a4c
ViewVC logotype

Diff of /trunk/models/johnpye/leastsq.a4c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2617 by jpye, Fri May 11 19:52:18 2012 UTC revision 2618 by jpye, Fri May 11 20:44:49 2012 UTC
# Line 7  Line 7 
7  IMPORT "ipopt";  IMPORT "ipopt";
8  IMPORT "johnpye/extpy/extpy";  IMPORT "johnpye/extpy/extpy";
9  IMPORT "johnpye/leastsq_fit";  IMPORT "johnpye/leastsq_fit";
10    
11  REQUIRE "atoms.a4l";  REQUIRE "atoms.a4l";
12    
13  (*  (*
# Line 41  MODEL leastsq; Line 42  MODEL leastsq;
42      FOR i IN [1..n] CREATE      FOR i IN [1..n] CREATE
43          f[i] IS_A fn(p, x[i]);          f[i] IS_A fn(p, x[i]);
44      END FOR;      END FOR;
45      sse IS_A solver_var;      obj: MINIMIZE SUM[(y[i] - f[i].y)^2 | i IN [1..n]];
     sse = SUM[(y[i] - f[i].y)^2 | i IN [1..n]];  
     MINIMIZE sse;  
46  METHODS  METHODS
47  METHOD on_load;  METHOD on_load;
48      FIX x[1..n], y[1..n];      FIX x[1..n], y[1..n];

Legend:
Removed from v.2617  
changed lines
  Added in v.2618

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22