Author |
Topic  |
|
sina1366
7 Posts |
Posted - 05/20/2014 : 09:01:42 AM
|
Hi I use OriginPro 8 and I want to fit my data with my equation. The equation has some parameters and constants. How can I enter my constants?
(In my origin, I don't have "The Fitting Function Builder")
ss |
Edited by - sina1366 on 05/20/2014 09:24:05 AM |
|
snowli
USA
1411 Posts |
Posted - 05/20/2014 : 1:56:05 PM
|
Hello,
In 8.0, you can choose Tools: Fitting Function Organizer menu. Then create fitting function there.
There is no field to define constant in 8.0. We support it in later versions.
Two workarounds in Origin 8.0:
1. Just define the constant as another parameter in the Parameter Names field Then when using Nonlinear Curve Fit dialog to fit data with this function, go to Parameters tab. Enter the constant value and check the Fix checkbox there. The parameter value is fixed during the fit so it's similar to constant.
2. As long as the Function Form isn't Expression, in Function box, you can enter multi-line codes.
E.g. I set Function Form as Equation. Then in Function box, I entered c=2; y=A*c*x;
The disadvantage of 2 is that you will not be able to see constant in result sheet. And it's not convenient to modify the constant value since you need to edit in the Fitting Function Organizer again.
We really encourage you to upgrade to latest version since it's much easier to define a fitting function with wizard to guide you through instead of checking all fields in Fitting Function Organizer.
Also wizard gives you initial parameter values 1 so when open Nonlinear Curve Fit dialog, you can start fit right away with initial parameter values 1. In Fitting Function Organizer, you need to make sure to enter some initial parameter value in Parameter Settings field. Or after open Nonlinear Curve Fit dialog, you must go to Parameters tab to enter some initial values first. Otherwise they are missing values and fit will fail.
Thanks, Snow OriginLab Corp. |
Edited by - snowli on 05/20/2014 1:57:53 PM |
 |
|
sina1366
7 Posts |
Posted - 05/21/2014 : 10:33:06 AM
|
Thanks for your help... What should I do if I have one equation and two constants? e.g. y = A*x+B where A is parameter and B is constant. I want to assign two values to B in One step (simultaneously). Should I write: y = A*x+B; B = 1; B = 3.5; ? I have two datasets (x,y) with parameter A in common.
ss |
 |
|
snowli
USA
1411 Posts |
Posted - 05/21/2014 : 11:31:35 AM
|
Hello,
You should use 1 method to define the function, treating both A and B as parameters.
We support fix parameters during fitting. And when fitting multiple dataset, we support global fit so parameters can be shared among datasets.
So in Nonlinear Curve Fit dialog, select the function first. Then go to Settings: Data Selection tab. click > button next to Input node to add all datasets you want to fit. Range1, Range2, etc. will show below Input Data so you know how many datasets you are fitting.
Then go to Top of the Data Selection tab, set Multi-Data Fit Mode to Global Fit.
Go to Parameters tab. --> U will see A, B, A_2, B_2 since each dataset will get two paraemters. You can check Share button next to A so A_2 will be gone. A will be shared between two dataset. Enter B and B_2 values as 1 and 3.5 and check Fixed checkbox for them. Click Fit to do the fit.
In result sheet, u can see A are shared. two B values are fixed at what you set.
You can left click green lock in result sheet and choose Change Parameter context menu to open NLFit dialog again to modify your parameter values if needed.
Thanks, Snow |
 |
|
sina1366
7 Posts |
Posted - 05/25/2014 : 08:15:22 AM
|
Dear Snow Thank you very much for your big big favor...It was a great help to me :)
ss |
 |
|
|
Topic  |
|
|
|