Origin Version (Select Help-->About Origin): Origin 7.5 Operating System: XP
I have thousands of data to be fitted. I have defined my user-denifed fuction called SED in the Origin. Now I want to do curve fitting via automation and extract the parameters in Origin.c The code is like "#include <Origin.h> //////////////////////////////////////////////////////////////////////////////////// void test() { nlsf.func$ = SED; // select SED fitting function L0 = 1000; //initialize parameter values tau = 1000; beta = 0.5; nlsf.cleanUpFitData(); nlsf.fitdata$ = b; nlsf.iterate(20); nlsf.xmode = 2; nlsf.funcx$ =A; nlsf.funccol$ = B; nlsf.makecurve(func); } " But i dont know why I get error below C:\.....\OriginC\SED.cpp(26) :Error, Variable "SED" not declared C:\.....\OriginC\SED.cpp(26) :Error, general compile error C:\....\OriginC\SED.cpp(23) :Error, error(s) found in compiling function test
1. You must define nlsf with using nlsf = LabTalk.NLSF. 2. Parameter names cannot be used in OriginC. Use nlsf.pn instead. 3. All strings must be quoted. 4. Values of nlsf.fitdata$|funcx$|funccol$ must be full dataset names.
Finally, you can use the MultiFit addon module to fit multiple curves from the same graph or worksheet or collect the parameters for multiple fits in one worksheet.