T O P I C R E V I E W |
einheitskreis |
Posted - 08/17/2017 : 10:22:43 AM Hello
I would like to implement a curve fit that I've been using with another software into Origin. I'm not proficient in programming, so "Equations mode" seems to me like the best way to do it. I have the independent variable TEMP, the dependent variable CD and the parameter H,DEU,REFU,DEN,REFN,TM. The intermediary variables are K,P,U,F,V,CDU,CDN.
The input for the other program (Scientist 3.0) were as follows:
// Model two state IndVars: TEMP DepVars: F, CD, K Params: H, DEU, REFU, DEN, REFN, Tm
K=EXP(H/(8.31*(TEMP+273.15))*((TEMP+273.15)/(Tm+273.15)-1)-ln(0.75*0.0002^2))
P=1/(3*K*(0.0002^2))
U=(-P/2+(P^2/4+P^3/27)^(1/2))^(1/3) V=-(P/2+(P^2/4+P^3/27)^(1/2))^(1/3) F= U+V+1
CDU=REFU+DEU*(TEMP+273.15) CDN=REFN+DEN*(TEMP+273.15) CD=F*(CDN-CDU)+CDU
I don't know how to define the variable K, the output when trying to compile is: "CD = -- (Undefined variable: K)"
I would be really happy if someone can help me with this.
Best regards
- |
2 L A T E S T R E P L I E S (Newest First) |
einheitskreis |
Posted - 08/17/2017 : 11:45:48 AM Thank you so much, it worked  I think the problem was that I wanted to also include the variables F and K in the definition window.
Thanks again for the fantastic support
- |
arstern |
Posted - 08/17/2017 : 11:21:21 AM Hi,
Because you have multiple equations to solve for CD, I selected the Equations option under Function type.
Below is how I setup the variables/parameters according to your post.

I then input all equations into the Function Body.

Here is a link for more information on setting up nonlinear fitting functions in Origin. http://www.originlab.com/doc/Origin-Help/Nonlinear-Curve-Fit
Thanks Aviel OrginLab |
|
|