T O P I C R E V I E W |
hassan2020 |
Posted - 02/04/2009 : 05:34:57 AM Hi please how to fit this function in origiC y=[exp(P1*x/1) +P2*x^1]+[P1*exp(x/2) +P2*x^2]+[P1*exp(x/3)+P2*x^3]+[P1*exp(x/4)+P2*x^]+[P1*exp(x/5)+P2*x^5]+...+[P1*exp(x/k)+P2*x^k]+...... (k=1,...,1000)
thanks for help. |
1 L A T E S T R E P L I E S (Newest First) |
VincentLiu |
Posted - 02/05/2009 : 04:49:26 AM Hi hassan2020,
You may use following codes to define the function:
y=P1*exp(x)+P2*x; for (int ii=2;ii<=1000;ii++) { y= y+P1*exp(x/ii)+P2*x^ii; }
The following image may help you to define the fitting function. Please note that I treat your function as
y= [P1*exp(x/1) +P2*x^1] +[P1*exp(x/2) +P2*x^2]+[P1*exp(x/3)+P2*x^3]+...+[P1*exp(x/k)+P2*x^k]+...... (k=1,...,1000)
There is a minor different between your function and the function above. So if you wrote the function correctly, you need to do minor modification to the codes.
For more details about User-Defined function, please refer to http://www.originlab.com/www/helponline/Origin8/en/mergedProjects/Tutorial/Tutorial/User_Defined_Fitting_Function_using_OC.html
Best regards, Vincent Liu OriginLab Technical Services
|
|
|