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 gaus peak with exponential tail

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
moritzpascal Posted - 05/10/2013 : 10:39:52 AM
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??
1   L A T E S T    R E P L I E S    (Newest First)
Sam Fang Posted - 05/13/2013 : 02:31:43 AM
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

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