Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
nevinlambert
Posted - 08/24/2005 : 10:11:13 AM Origin Version (Select Help-->About Origin): 7.5 Operating System: XP
Hello:
I want to perform 2d gaussian fitting using my own function on a series of datasets (up to 20) and have written (actually corrupted an example script) a test script to automate this tast, starting with only 2 datasets (data1 and data2). Everything seems to work OK except that the 2nd independent variable doesn't get specified- I was using nlsf.setIndep to do this, but it doesn't seem to work? Can this method be used to specify >1 independent variable in a dataset?
I suspect I could speed up this task by writing code in Origin C, but my programming skill falls a little short of that at the moment.....thanks.
The script I'm trying is:
// Set up the fit //
nlsf.func$ = gaussian2doffset; // select fitting function
nlsf.numfitsets = 2; // indicate 2 datasets to be fitted
nlsf.numDepend = 1; nlsf.numIndep = 2;
nlsf.fitdata1$ = data1_c; // define 1st dataset to be fitted