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
 Forum for Origin C
 NLfit with 3 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

MicTheMan

Germany
4 Posts

Posted - 12/15/2008 :  06:40:31 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 8 and SR4
Operating System: Win XP

Hi there,

I've worked with Origin 6 and 8 before but I never made my own NLFitfunction. The other Thing is that I have no experiences with C.

What I have:

2 columns: Temperature (T), Heat (H) with them I've made a graph.

equation 1:
Y is a function of (T,T[i-1],Y[i-1],and other Parameters)

equation 2:
alp is a function of (T,Y,H[i-1],the three Parameters i want to fit, and other Parameters)

equation 3:
H is a function of (T,T[i-1],alp,alp[i-1],H[i-1])
(it is a trapezoidal rule)

What I need:

I want to fit 3 Parameters which are all in equation 2.
And I need the results in a Table
Is it that Origin compares the H in the column with the H I want to calculate? I really don't know how it works. :(

I've chosen T as independent and Y,alp,H as dependent and i have stated 11 Parameters from which i will fit 3. The others are constant.

This does not work and I have the Problem that I must chose a column for Y and alp and H(the one calculated for the fit) which i don't have before calculating.

here an excerpt of my test:
"
Number Of Parameters = 11
Function Type = User-Defined
Function Form = Equations
Path =
Number Of Independent Variables = 1
Number Of Dependent Variables = 3
FunctionPrev = NewFunction2

[Fitting Parameters]
Names = *
Initial Values = *
Meanings = ?,?,?,?,?,?,?,?,?,?,?
Lower Bounds =
Naming Method = User-Defined
Number Of Significant Digits = -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1

[Independent Variables]
T =

[Dependent Variables]
Y =
alp =
H =

[Formula]
{

Y=*;
alp=*;

if(alp<0)
alp = 0;

H =*;
}

I have 3 curves i want to fit parallel (means general fit). Is there anything I have to consider?

Thanks for helping

Deanna

China
Posts

Posted - 12/17/2008 :  02:13:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I think we should set T as the independent variable and H as the dependent variable. The calculation of Y, alp and H should be defined in the funciton definition.

Would you please provide the formulas/equations for calculating Y, alp and H?

Deanna
OriginLab Technical Services
Go to Top of Page

MicTheMan

Germany
4 Posts

Posted - 12/17/2008 :  04:08:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

thanks for help.

Parameters: a,b,c,d,e,f,g,h,k,l,m where k,l,m are the 3 to fit. a could vary when i will fit more than one graph. Meaning a1 for graph 1... an for graph n. The others are constant.
equations:

Y=0,5*(T-T[i-1])*(a*b*(exp(-c/(d*(T+273,15)))+exp(-c/(d*(T[i-1]+273,15))))+Y[i-1]

Y could be calculated outside of origin because it is independent from alp and H and from the three parameters to fit. I have a column for that.

alp=(k*exp(-l/(d*(T+273,15)))*(e-f*exp(-Y)*(1-H[i-1]/g)*(1-H[i-1]/(h*g))^m)*g

H=0,5*(T-T[i-1])*(alp+alp[i-1])*a+H[i-1]

[i-1] might be a problem.

Thanks

Michael
Go to Top of Page

Deanna

China
Posts

Posted - 12/18/2008 :  12:12:58 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Michael,

Because we need to use H[i-1] to calculate H[i], I am not sure whether the current version of Origin supports this. I have passed your question onto our researchers. They need some time to figure out whetehr we can do that with Origin 8. We will let you know as soon as we reach a conclusion.

Thank you for providing the information.

Deanna
OriginLab Technical Services
Go to Top of Page

MicTheMan

Germany
4 Posts

Posted - 12/18/2008 :  09:54:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your Help.
I will wait for new Ideas.

Michael
Go to Top of Page

MicTheMan

Germany
4 Posts

Posted - 01/21/2009 :  08:28:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Deanna,

is there any news concearning my problem? I need to use it soon.

Michael
Go to Top of Page

easwar

USA
1965 Posts

Posted - 01/23/2009 :  12:38:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Michael,

We will e-mail you to get some sample data from you so we can look into this further.

Thanks,

Easwar
OriginLab
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