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
 All Forums
 Origin Forum
 Origin Forum
 fitting to double integral and summation

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
cellbiophysics Posted - 02/20/2008 : 12:55:07 AM
Origin Version (Select Help-->About Origin): Origin 8.0
Operating System: Window XP

I am new in Origin 8. I would like to fit the data to a nonlinear function including the summation and double integral. Please help me to fit. My fitting function is given by



,where t is an independent variable and y is variable, and p1, p2 are parameters. And all the functions of F, G, H include "n". What I will try is to use trapezoidal rule with three "for" loops. But, I'm afraid it takes too much long time.
If you also have a good idea using Origin 7.5, please let me know.

Thanks

KB.

Edited by - cellbiophysics on 02/20/2008 02:48:49 AM
4   L A T E S T    R E P L I E S    (Newest First)
cellbiophysics Posted - 02/26/2008 : 11:49:56 PM
Thank you, Larry.
I already considered some functions in Numerical Recipes in C.
I think "qromberg" is better than "qgauss" in my case.
I'm not sure which one is better. I'll try both of them.
Thanks again!

KB.
larry_lan Posted - 02/24/2008 : 01:20:53 AM
Hi:

Sorry, I have added the comments. However, there is no function to perform multidimensional integrals in Origin, you should write codes by yourself. May be this link can help.

Thanks
Larry
OriginLab Technical Services
cellbiophysics Posted - 02/21/2008 : 9:34:30 PM
Thanks for your idea.
But, I don't understand exactly your code. If your code can make a fitting time shorter, it's better. I don't know how to use your code to aapply to the double integral. Please add a comment into your code or please explain in detail.
Thanks again.

KB

PS. I would like to use the dataset to fit the data in the graph window. I don't know which one is x-axis in your code. What should I modify in your code to get the double integral in NLSF window? Please let me know.


Edited by - cellbiophysics on 02/21/2008 11:06:52 PM
larry_lan Posted - 02/21/2008 : 04:43:52 AM
This function is so complicated, I have no better idea. Instead of writing code to implement the trapezoidal rule, may be you can use the ocmath_integrate function to calculate the integrated results, .

For example, this code will integrate the function



void test()
{
// Integral steps
int nSize = 101;
// Vector to save the x, y value of the curve
vector vx(nSize);
vector vy(nSize);
// Vector to save the cumulative integral results
vector vInteg(nSize);

// Construct the X value of the curve
vx[0] = -1.0;
for(int i = 1; i < nSize; i++)
{
vx[i] = vx[i-1] + 0.02;
}
// Construct the Y value of the curve
vy = exp(vx);

IntegrationResult result;
// Perform integration using trapezoidal method.
int nRet = ocmath_integrate(vx, vy, 0, nSize-1, &result, vInteg);

double px = 0;
double py;
// Get the cumulative result at X=0
int iRet = ocmath_interpolate(&px, &py, 1, vx, vInteg, nSize);
}


Thanks
Larry
OriginLab Technical Services

Edited by - larry_lan on 02/24/2008 01:17:15 AM

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000