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
 Limiting Non-Linear Fit Function

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
esacay Posted - 10/29/2013 : 8:48:01 PM
Origin 9.0.0. B45
Windows 7

I am trying to fit a collection of data points using the NLFit dialog. The overall function that I need to use is a sum of 3 separate functions [F(x) = A(x)+B(x)+C(x)]. How do I specify that one of my separate functions is only included to a certain point? ie.

B(x) = N*exp[(x-x0)/B)], for x<x0
B(x) = 0, for x>= x0


ES
1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 10/30/2013 : 09:51:40 AM
Hi esacay,

You can use the conditional operator which has the following syntax:
<CONDITION>?<VALUE_ON_TRUE>:<VALUE_ON_FALSE>
http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:Operators#Conditional_Operator_.28.3F:.29

So, in your case:
B(x)=x<x0?N*exp((x-x0)/B0)):0;
Note: I have changed the parameter B to B0 as it conflicts with the function name.

--Hideo Fujii
OriginLab


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