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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 auto fitting using LabTalk
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

idoidoido

Israel
2 Posts

Posted - 01/20/2002 :  04:50:00 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
i wrote the following LabTalk script in order to do a voigt fit:

nlsf.init()
nlsf.func$=Voigt;
nlsf.fitcolnum = 1
nlsf.fitWksName$=data1_A1;
nlsf.p1=0;
nlsf.p2=36;
nlsf.p3=10000;
nlsf.p4=10;
nlsf.p5=10;
nlsf.iterate(100);

but i have a problem: the script only works when i plot the data base before. i want it to fit directly from the data base.
how can i do that?

Laurie

USA
404 Posts

Posted - 01/21/2002 :  11:45:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Take a look at this Fitting with Script example and then let me know if you still have questions.

OriginLab Technical Support
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 03/17/2006 :  5:08:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The above link is broken, and the new one is:
http://www.originlab.com/www/support/resultstech.aspx?ID=180&language=English

Go to Top of Page

fzimnoch

USA
28 Posts

Posted - 03/20/2006 :  5:28:57 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Idoidoido:

The following Labtalk script will fit to either a dataset in a worksheet or a curve in a plot depending on whether a worksheet or graph is active before you execute the script.

// Fit to Nth Column in Active Worksheet, or
// Fit to Nth Curve in Active Graph Window
n=3; //N is Nth Col or Curve of Active Window
nlsf.init();
nlsf.func$=Voigt;
nlsf.fitcolnum = 1;
nlsf.fitdata$=%(n,@D); //Fit Nth Column or Curve
nlsf.p1=0;
nlsf.p2=36;
nlsf.p3=10000;
nlsf.p4=10;
nlsf.p5=10;
nlsf.iterate(100);
nlsf.end();
rescale;
// The End (fsz)
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000