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
 Origin Forum
 Nonlinear curve fitting with multiple equations
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cweb

Australia
2 Posts

Posted - 04/07/2011 :  11:45:35 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Origin 6.0
Operating System: Windows XP

I have been trying to fit a curve with multiple intermediate variables using the following code (in Equations mode):

y=(IP/x)*deltaip+(2*D/x)*deltad+(I/x)*deltaf;
D=(1+4*Kd*(x-I)-((1+8*Kd*(x-I))^0.5))/(8*Kd);
I=x-IP-2*D;
IP=(1+2*Kip*(x-2*D)-((1+4*Kip*(x-2*D))^0.5))/(2*Kip)

Where Kip,Kd, deltaip, deltad and deltaf are parameters and D, I, IP are the intermediate variables.

Whenever I try to fit using this function I initially get an error saying too few data points or the data step is too big. If I click the iteration button again then I get an error claiming my fitting function is not generating values and to check that my dataset has values (All I have done at this stage is click the iteration button again!).

Are there any ways around this? I have a feeling it has to do with defining initial values for D, I and IP but I'm not sure how to go about this? Thanks!!

easwar

USA
1964 Posts

Posted - 04/14/2011 :  3:43:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

The order of your statements is wrong, the statement with y= should be the last, so try it this way:


D=(1+4*Kd*(x-I)-((1+8*Kd*(x-I))^0.5))/(8*Kd);
IP=(1+2*Kip*(x-2*D)-((1+4*Kip*(x-2*D))^0.5))/(2*Kip);
I=x-IP-2*D;
y=(IP/x)*deltaip+(2*D/x)*deltad+(I/x)*deltaf;


Also try the 8.5 demo.

We now have a Fitting Function Builder tool, where you can put in some initial values and test the function to see if it is generating values, while you are creating it. So that makes it easy to check if function is okay, BEFORE you try fitting with it.

See: http://originlab.com/www/helponline/Origin/en/Category/The_Fitting_Function_Builder.html

Easwar
OriginLab
Go to Top of Page

cweb

Australia
2 Posts

Posted - 04/18/2011 :  10:28:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for that. I couldn't get it to work on Origin 6.0 but 8.5 worked like a charm.
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