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
 fit a data range
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

vassilios_1

Germany
4 Posts

Posted - 12/02/2003 :  11:01:26 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
:( I'm trying to fit a selected part of a function curve. Although I use nlsf.dataBegin and nlsf.dataEnd my script uses always the complete x-column --> so the fit result is total rubbish.
Here the code:

[EXECFIT]
nlsf.func$ = cubic;
nlsf.dataBegin= Fstart; //some start value for fitting
nlsf.dataEnd = Fend;
nlsf.xBegin = fxdata[1]; //some start value for plotting the fit
nlsf.xEnd = fxdata[2];
nlsf.cleanupfitdata();
nlsf.fitdata$ = Polyfit_TotMit;
nlsf.xmode = 4;
nlsf.funcx$ = Polyfit_PolyX; //dataset to store
nlsf.funccol$ = Polyfit_PolyY; //dataset to store fitted Y values
nlsf.iterate(20);
nlsf.makecurve(func); //dataset generated for the fitted curve


Has anyone an idea or working code?
Thanks! :)

Mike Buess

USA
3037 Posts

Posted - 12/02/2003 :  12:18:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Try moving nlsf.cleanupfitdata() to the beginning of the script.

Mike Buess
Origin WebRing Member
Go to Top of Page

vassilios_1

Germany
4 Posts

Posted - 12/02/2003 :  12:52:29 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
All right! It solves the problem.
Thanks for your help!
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