T O P I C R E V I E W |
artem |
Posted - 11/29/2007 : 01:12:22 AM Origin Version (Select Help-->About Origin): Origin 7.5 SR 5 Operating System: windows vista
Hi,
I am a beginner of orgin C and trying to calculate a dataset from NLSF using nlsf.makecurve. Some how after I run the program, I got nothing other than a new graph layer. ( I have a new blank worksheet layer before I run the code.) Any advice/help is welcome. Many thanks.
Below is the small program I wrote:
void nlsf_test() { using nlsf = LabTalk.NLSF; // define nlsf nlsf.func$ = "Gauss"; // select fitting function nlsf.p1 = 1; //initialize parameter values//p1 is c, p2 is q, p3 is p(ower), p4 is F1, p5 is ig// nlsf.p2 = 1; nlsf.p3 = 1; nlsf.p4 = 1; //nlsf.p5 = 0;
nlsf.makecurve("func"); nlsf.xbegin = 0.5; nlsf.xstep = 0.5; nlsf.xend = 20; nlsf.xmode = 5;
nlsf.funcx$ = "data1_a"; nlsf.funccol$ = "data1_b"; }
Edited by - artem on 11/29/2007 01:21:36 AM |
2 L A T E S T R E P L I E S (Newest First) |
artem |
Posted - 11/30/2007 : 01:18:41 AM Thank you very much, Mike. I emailed their tech support this moring and got their reply late this afternoon. They said the same thing. Thank you very much for your support.
|
Mike Buess |
Posted - 11/29/2007 : 4:50:46 PM First, you should wait until its parameters (nlsf.xbegin, nlsf.funccol$, etc.) have been defined before you execute nlsf.makecurve(). Second, using makecurve with xmode=4 or 5 can yield unpredictable results. I find that it's more reliable to use xmode=2 and create the X values myself...
Dataset ds("Data1_A"); // declare column A as dataset ds.Data(0.5,20,0.5); // create X values nlsf.xmode = 2; nlsf.funcx$ = "data1_a"; nlsf.funccol$ = "data1_b"; nlsf.makecurve("func");
Mike Buess Origin WebRing Member |
|
|