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
 Fit data with integration&summation functions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

edwardclhuang

Taiwan
9 Posts

Posted - 11/20/2011 :  2:31:17 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Origin8, SR4
Operating System:Win7, 64bit

Dear Sirs
I have to questions in this post. I have read some tutorials but still not so sure how I can proceed it. Please help me figure it out and thanks so much in advance.

1. I have a set of data and I would like to fit them with the following equation,

Independent Variables: x
Dependent Variables: y
Parameter Names: A0, A1, A2, A3, A4

It seems I can use "Labtalk" or "OriginC" to compute it, am I right? Please teach me how to do it.

2.After I get the best fitting results of A0~A4, how can I subtract this function with them in "Set Column Values "? I mean I have another set of data and I want to subtract the function as posted with known A0~A4.

Once again, any help or tutorial would be much appreciated.

Hideo Fujii

USA
1582 Posts

Posted - 11/21/2011 :  3:17:08 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Edward,

The following tutorials may be helpful:

http://wiki.originlab.com/~originla/howto/index.php?title=Tutorial:Fitting_with_Integral_using_LabTalk_Function

http://wiki.originlab.com/~originla/howto/index.php?title=Tutorial:Fitting_with_Integral_using_NAG_Library

I think that you probably need to redefine the function by replacing the integral variable by e.g., z=A4/x .

Regarding the subtraction, you can subtract the data from your fitting result by "Analysis: Data Manipulation: Subtract Reference Data".

Note that in the latest Origin 8.6 version, you can directly define a fitting function which contains the integral in Fitting Function Builder. If you're interested in it, you can try the evaluation (demo) version of the latest Origin.

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 11/21/2011 3:34:19 PM
Go to Top of Page

edwardclhuang

Taiwan
9 Posts

Posted - 11/23/2011 :  09:35:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Hideo Fuji

Thanks for the help. Based on your suggestion, first of all I rewrite my function as following,

A0,A1,A2 are fitting parameters. If I replace A2/x = x and abbreviate the equation as following,

Then it comes a problem: I can not get A0, A1, and A2 apart from each other!!

Back to the first equation shown above, I am stuck on the upper bound in the integral(A2/x). Because it also shows in the formula for doing calculation. How can I do that by NAG library? I have tried to write this as

struct user
{
double A2c;

};
static double NAG_CALL f_callback(double x, Nag_User *comm)
{
struct user *sp = (struct user *)(comm->p);
double A2c;
A2c = sp->A2c;
return (A2c/x)^4 * exp(A2c/x) / ((exp(A2c/x)-1)^2);
}

How should I write in the "editable part" please? It seems I should replace "d01smc" formula by some other formulas, and what will be the proper formula?

I am really appreciated with your kindly help.
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