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
 Cubic polynomial, additional constraints
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

GeoGuy

Germany
4 Posts

Posted - 02/26/2013 :  7:22:02 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hey,

I'm having some trouble with a simple fit in Origin. I want to fit data from a thermal expansion experiment.

It's a cubic polynomial y=A+B*x+C*x^2+D*x^3 with an additional constraint, namely x=x-293. In the end, I want to get the calculated and fitted value of "B" from this equation.


I didn't see no problem first but it just won't work.
I appreciated any helpful suggestions.
Got access to OriginPro8G@Windows7.


Thank you.

A world build on bees.

mikefeehts110

New Zealand
Posts

Posted - 02/26/2013 :  10:40:46 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Have you mis-typed the constraint? Wouldn't x=x-293 only have a solution if 0=-293?
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 02/27/2013 :  4:35:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Is it actually like "A<=-293" ?
You can use the "Cubic" function in Polynomial category in the Non-Linear Curve fitter.
In it, you can set the boundary of the parameters.

Hope this is a good shot.

--Hideo Fujii
OriginLab
Go to Top of Page

GeoGuy

Germany
4 Posts

Posted - 02/28/2013 :  2:38:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Well, that didn't work. Maybe I did not illustrate my problem. When it comes to functions, and math in general, it's over (:

I found the cubic polynomial, which I need. I simply need to modify the equation like this:

y = A + B*(x-293.15) + C*(x-293.15)^2 + D*(x-293.15)^3

I got Temperature data (C) that I need to bring to K somehow (god knows why I can't calculate K values BEFORE i fit the data, I'm a Geology student and suddenly I find myself doing thermal expansion experiments with some crystollography guys).

If I enter the equation like that, something goes terribly wrong.

A world build on bees.
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 02/28/2013 :  4:08:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi GeoGuy,

For your application, maybe the easiest approaches are EITHER (though analytically you can get the new set of K-based parameters from the current C-based parameters):

1) Before fitting, convert your X values from Celsius data to Kelvin using Set Column Values tool. Then, fit it with the built-in Cubic function.

or

2) Define a completely new user-defined function:
y = A + B*(x-293.15) + C*(x-293.15)^2 + D*(x-293.15)^3
by Fitting Function Builder tool; then you can fit your data using this.

I hope I didn't miss your points.

--Hideo Fujii
OriginLab
Go to Top of Page

GeoGuy

Germany
4 Posts

Posted - 03/01/2013 :  07:15:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, I guess the set column values tool was the right thing, results seem fine. I still don't understand why

y = A + B*(x-293.15) + C*(x-293.15)^2 + D*(x-293.15)^3

in the builder tool didn't work out.
Problem is solved anyways.
Thanks a lot!

A world build on bees.
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 03/01/2013 :  10:27:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi GeoGuy,

I have defined a new function of your exact form:

y = A + B*(x-293.15) + C*(x-293.15)^2 + D*(x-293.15)^3

as Function Type="LabTalk Script" using Fitting Function Builder in my Origin9, and worked fine.
Unfortunately your version 8.0 doesn't have this intuitive tool to define a user-defined fit function,
but you should be able to do so by using Fitting Function Organizer as both tools can produce the .FDF
file at the end.

--Hideo Fujii
OriginLab
Go to Top of Page

GeoGuy

Germany
4 Posts

Posted - 03/06/2013 :  04:31:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I will try this out as soon as possible.
Thanks a lot!

A world build on bees.
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