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

D_Mike

Austria
Posts

Posted - 12/10/2007 :  7:03:28 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: windows Xp

Hi chaps,

I have some data that I want to fit in origin. I have already successfully done this excel but for two reasons I need to use something else (I am a bit untrusting of solver's ability to find the minimum and also there are statistical parameters outputted by it).

so, the problem is:

I have a chemical reaction where A = B --> C (= denotes in equilibrium with).

I have monitored the species of all three reactants A, B and C (these are my dependant variables) over time. I have equations derived to calculate A, B and C at any time, but there is a separate equation for each. However each equation contains three parameters, k1, k2 and k3 which are shared between the equations and must be the same for each.

So what I want to do is fit three sets of data, with three different functions but with global parameters. Is this possible in origin, and if so, how? I know it is possible to fit multiple sets of data with shared parameters and one function, but I haven't read anything about being able to use multiple functions.

Thanks

Mike Buess

USA
3037 Posts

Posted - 12/10/2007 :  11:17:19 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
A fitting function can have multiple dependent variables so I'd try something like this...



Mike Buess
Origin WebRing Member
Go to Top of Page

D_Mike

Austria
Posts

Posted - 12/11/2007 :  03:46:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, Mike! This occured to me overnight... It was rather obvious. thanks for the help though. if only my equations were that simple!
Go to Top of Page

D_Mike

Austria
Posts

Posted - 12/11/2007 :  04:58:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ok, 2nd problem... my functions all compile ok individually but when i but them all together they won't... I can't see a problem with any of these... they have a strange form because i put them together in maple and then copied and pasted from there...

A = 1.000000000*A0*((-.5*k1+.5*k2+.5*k3+.5*((k1+k2+k3)^2-4*k1*k3)^.5)*exp(-(.5*k1+.5*k2+.5*k3-.5*((k1+k2+k3)^2-4*k1*k3)^.5)*t)-(-.5*k1+.5*k2+.5*k3-.5*((k1+k2+k3)^2-4*k1*k3)^.5)*exp(-(.5*k1+.5*k2+.5*k3+.5*((k1+k2+k3)^2-4*k1*k3)^.5)*t))/((k1+k2+k3)^2-4*k1*k3)^.5

B = -1.000000000*A0*k1*(exp(-(.5*k1+.5*k2+.5*k3-.5*((k1+k2+k3)^2-4*k1*k3)^.5)*t)-exp(-(.5*k1+.5*k2+.5*k3+.5*((k1+k2+k3)^2-4*k1*k3)^.5)*t))/((k1+k2+k3)^2-4*k1*k3)^.5

C = A0*(1-1.000000000*(.5*k1+.5*k2+.5*k3+.5*((k1+k2+k3)^2-4*k1*k3)^.5)*exp(-(.5*k1+.5*k2+.5*k3-.5*((k1+k2+k3)^2-4*k1*k3)^.5)*t)/((k1+k2+k3)^2-4*k1*k3)^.5+1.000000000*(.5*k1+.5*k2+.5*k3-.5*((k1+k2+k3)^2-4*k1*k3)^.5)*exp(-(.5*k1+.5*k2+.5*k3+.5*((k1+k2+k3)^2-4*k1*k3)^.5)*t)/((k1+k2+k3)^2-4*k1*k3)^.5)

admittedly they are hard to check... can anyone see anything glaringly wrong wit them?

Edited by - D_Mike on 12/11/2007 05:00:53 AM
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 12/11/2007 :  06:28:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I'm not even going to try to check the expressions but did you leave out the semicolons like you did above?

Mike Buess
Origin WebRing Member
Go to Top of Page

D_Mike

Austria
Posts

Posted - 12/11/2007 :  06:44:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

I did.

so it actually turned out to be a very trivial problem. Thanks for your help... I am somewhat of an origin novice and feel a bit like I've jumped in at the deep end.

Cheers,

Mike
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