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
 Boltzmann fitting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Khosrove

Latvia
12 Posts

Posted - 03/21/2016 :  11:48:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I want to fit the Boltzmann function to a dataset, without any specific parameters set.
Here is what I have tried, but it just creates a graph of the dataset and a workbook with x values and "10" in every single cell of the fit column.
What am I doing wrong here?

nlsf.func$ = Boltzmann; // select Boltzmann fitting function
nlsf.fitdata$ = Book2_HH@9; // define dataset to be fitted ;
nlsf.fit(100); // iterate 100 times

Hideo Fujii

USA
1582 Posts

Posted - 03/21/2016 :  1:38:49 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Khosrove,

nlsf objects are obsolete, and you should use NLFit x-functions like:
nlbegin iy:=[Book2]9!col(HH) func:=Boltzmann;
nlfit;
nlend 1;
See details in http://www.originlab.com/doc/X-Function/ref/nlbegin .

Hope this helps.

--Hideo Fujii
OriginLab
Go to Top of Page

Khosrove

Latvia
12 Posts

Posted - 03/21/2016 :  2:22:37 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Hideo Fujii,

I have OriginPro 8 SR4, sorry for not mentioning that earlier.
I tried your script, but in return I get:

general operation failure
general operation failure
general operation failure
general operation failure
Internal error code: -898, -28673

#Command Error!
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 03/21/2016 :  3:39:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Khosrove,

Sorry, but I cannot reproduce the problem because I don't have Origin 8 on my machine. You got the error probably because of the version compatibility. As far as I tried Origin 8.1, it worked.
If you just need to get the fitting result, you can try the evaluation version of Origin 2016.
http://www.originlab.com/demodownload.aspx

--Hideo Fujii
OriginLab
Go to Top of Page

Khosrove

Latvia
12 Posts

Posted - 03/22/2016 :  09:13:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your answers Hideo Fujii.

I got it to work in the end by setting the parameters.

nlsf.func$ = Boltzmann; // select Boltzmann fitting function
nlsf.fitdata1$ = [Book2]Sheet7!col(3); // define dataset to be fitted ;
nlsf.p1 = 701; // A1 of first dataset
nlsf.p2 = 106475; // A2 of first dataset
nlsf.p3 = 827.25523; // x0 of first dataset
nlsf.p4 = 28.4254; // dx of first dataset
nlsf.fit(100); // iterate 100 times
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