| T O P I C R E V I E W |
| pegor |
Posted - 02/22/2005 : 10:20:54 AM Hi Mike,
The error occures during execution. The error msg is: Error 28037.Likely caused by errors in the user defined formula or poor parameter initialization.
this is the code im using:
using NLSF = LabTalk.NLSF; NLSF.Init(); NLSF.Func$ = "user6"; NLSF.P4 = 2.50175; NLSF.FitData$ = crvData.GetName(); NLSF.Execute("parainit"); NLSF.Wtype = 1; NLSF.W$ = dsErr.GetName(); NLSF.ChiSqrErr = 0; NLSF.Fit(100); NLSF.Fit(100); NLSF.Fit(100); NLSF.PasteParams("P"); NLSF.End(); }
and this is the user6 function: y=P1*(1+P2*cos(2*Pi*(x-P3)/P4))
i want to fix P4 to the value 2.50175
Thanks in advance Best regards, Pegor
|
| 1 L A T E S T R E P L I E S (Newest First) |
| Mike Buess |
Posted - 02/22/2005 : 11:38:01 AM Hi Pegor,
Please use the "Reply to Topic" button to keep your posts in one thread. It gets confusing when you scatter the same thread over separate topics.
I suspect that user6 is a function defined by you and that you haven't provided a parameter initialization script. In that case NLSF.Execute("parainit") does nothing and you must initialize all parameters in your Origin C function...
using NLSF = LabTalk.NLSF; NLSF.Init(); NLSF.Func$ = "user6"; NLSF.P1 = 1.234; // use an appropriate value NLSF.P2 = 5.678; // ditto NLSF.P3 = 9.10; // ditto NLSF.P4 = 2.50175; NLSF.V4 = 0; // fix parameter 4 NLSF.FitData$ = crvData.GetName(); //NLSF.Execute("parainit"); NLSF.Wtype = 1; NLSF.W$ = dsErr.GetName(); NLSF.ChiSqrErr = 0; NLSF.Fit(100); NLSF.Fit(100); NLSF.Fit(100); NLSF.PasteParams("P"); NLSF.End();
Mike Buess Origin WebRing Member |
|
|