The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 specifying >1 independent variables in Labtalk

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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

nlsf.setDepend(z(1),data1_c);
nlsf.setIndep(x(1),data1_a);
nlsf.setIndep(y(1),data1_b);


nlsf.fitdata2$ = data2_c; // define 2nd dataset to be fitted

nlsf.setDepend(z(2),data2_c);
nlsf.setIndep(x(2),data2_a);
nlsf.setIndep(y(2),data2_b);

// Initialize parameter set for data1 //

nlsf.p1 = 100;
nlsf.p2 = 5;
nlsf.p3 = 0.2;
nlsf.p4 = 5;
nlsf.p5 = 0.2;
nlsf.p6 = 10;

// Initialize parameter set for data2 //

nlsf.p7 = 100;
nlsf.p8 = 5;
nlsf.p9 = 0.2;
nlsf.p10 = 5;
nlsf.p11 = 0.2;
nlsf.p12 = 10;

// Perform the fit //

nlsf.fit(1); // iterate 1 time
1   L A T E S T    R E P L I E S    (Newest First)
DrKlein1 Posted - 07/29/2010 : 11:28:16 AM
I have very much the same problem only that I am using Origin 6.1 and Windows XP as operating system

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000