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 for Programming
 Forum for Origin C
 NLSF : How to edit a built-in function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

funfine

USA
Posts

Posted - 07/30/2007 :  7:07:57 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): Origin Pro7 Sr5
Operating System: Win Xp

Hi everyone,

I have met a new problem. I need to fit the data with exponential modified gaussian function chromatographic(called GaussMod in Origin). But actually the data is supposed to be the difference of two GaussMod function (GaussModA - GaussModB), where they share the A, xc and w, only different parameter t0. Does anyone know how to do this? I try to write my new function, but in the file of GaussMod function, there is no formula of GaussModA and I don't know how to write Non-numerical Integration. I am totally lost. Anybody can give a clue?

By the way, I think this function is the convolution of Gaussian and exponential decay function. Am I right? A, xc, w is the amplitude, center and width of Gaussian function and t0 is the time constant of exponential function, right?

Thank you all very much!

Ying

Edited by - funfine on 07/30/2007 7:09:16 PM

Mike Buess

USA
3037 Posts

Posted - 07/30/2007 :  10:16:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Ying,

You can find script access to the GaussMod function here...

http://www.originlab.com/pdfs/curvefittingfunctions.pdf

Mike Buess
Origin WebRing Member
Go to Top of Page

funfine

USA
Posts

Posted - 07/31/2007 :  08:57:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

I have seen the file. But I still have no idea how to access this function. Just as I said, there is no formula in this file, neither I know how to write integration function. I tried some expression as simple as y = GaussMod(y0, A, xc, w, t0) - GaussMod(0, A, xc, w, t1). But it cannot go through compiling. Origin C keep telling me the function GaussMod is not found.

Thank you very much!

Ying
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/31/2007 :  09:26:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
First, the gaussmod function has six arguments... x and the five GaussMod parameters. Second, it is a LabTalk function and will not work directly in Origin C. You need to use something like this...

string strA;
strA.Format("gaussmod(%f,%f,%f,%f,%f,%f)",x,y0,A,xc,w,t0);
double dValA;
LT_evaluate(strA,&dValA);
// similar expression for gaussmodB -> dValB
y = dValA - dValB;

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/31/2007 09:28:37 AM

Edited by - Mike Buess on 07/31/2007 10:31:29 AM
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