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
 Help with fitting data to an integral
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

vphan

USA
Posts

Posted - 07/11/2007 :  4:49:38 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.0 SR4
Operating System:XP


Hi all,

I need to fit numerous sets of data to the form:

y(t)=Int[A*(sin(2*B*t*sin(b)))^2*sin(b)db] bmin=0, bmax=Pi. I am little lost as to what to do. I have already looked at numerous posts on this forum and am still confused as to what is needed to be done. Thanks for any help you can give me.

larry_lan

China
Posts

Posted - 07/11/2007 :  10:02:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi:

Actually, you can follow This Example. I modify the function a little and you can defile a function like:


double dU = PI;
double dL = 0.0;
double b = dL;
int nSteps = 100;
double db = (dU-dL)/nSteps;
double dF;
double dFF;
double dInteg = 0.0;
for (int ii = 0; ii < nSteps; ii++)
{
if (ii == 0)
dF = a * ( sin(2*b*x*sin(b)) * sin(2*b*x*sin(b)) ) * sin(b);
else
dF = dFF;
b += db;
dFF = a * ( sin(2*b*x*sin(b)) * sin(2*b*x*sin(b)) ) * sin(b);
dInteg += 0.5*(dF + dFF)*db;
}
y = dInteg;


Larry
OriginLab Technical Services
Go to Top of Page

vphan

USA
Posts

Posted - 07/12/2007 :  2:30:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for the 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