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
 fitting gaus peak with exponential tail
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

moritzpascal

Germany
1 Posts

Posted - 05/10/2013 :  10:39:52 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Origin 8.5 SR0
Operating System: XP

Hallo,
I am trying to fit alpha spectra with origin. therefore I need a fit function which describes an gaus peak with an left sided exponential tail.

my function looks like:
y=A/2 (((1-n)/t1)*exp((x-u1)/t1 + sig^2/(2*t1^2))*erfc(1/sqrt(2)*((x-u1)/sig+sig/t1))
+ n/t2*exp((x-u1)/t2 + sig^2/(2*t2^2))*erfc(1/sqrt(2)*((x-u1)/sig+ sig/t2));

when trying to compile the function I get the error
:Error, mismatching usage of parentheses

Is this a problem of how i use the erfc??

Sam Fang

291 Posts

Posted - 05/13/2013 :  02:31:43 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
There are two errors in the code:
1.
y=A/2*

2. A right parentheses is missing at the end of the code.

The correct code should be:
y =A/2* ( ((1-n)/t1)*exp( (x-u1)/t1 + sig^2/(2*t1^2) )*erfc( 1/sqrt(2)*((x-u1)/sig+sig/t1) )+ n/t2*exp( (x-u1)/t2 + sig^2/(2*t2^2) )*erfc( 1/sqrt(2)*((x-u1)/sig+ sig/t2) ) );


You can use Brace Matching tool in Code Builder dialog to check parentheses matching for the function definition code.

Sam
OriginLab Technical Services
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