how do I construct a CurveFitter in a macro for subsequent call?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how do I construct a CurveFitter in a macro for subsequent call?

Bill Christens-Barry
I'd like to employ the CurveFitter.doFit() method in a macro, but am
unsure how. In particular, how do I construct a new CurveFitter and
identify the coordinate arrays that are to be associated with it? I tried:

   x = newArray(1, 2, 3, 4);
   y = newArray(1, 4.1, 8.8, 16.3);
   cf = call("CurveFitter", "x", "y");

but this gagged on the lack of an explicit method. And once I have it
constructed, how do I call that particular CurveFitter, as the call
syntax seems to be:

   call("CurveFitter.doFit", "1"); // POLY2 fit for this example

Do I simply:

     call("cf.doFit", "1");

?

Thanks.

Bill Christens-Barry