Path: news.mathworks.com!not-for-mail
From: "Mohammad Monfared" <gohardoust@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Curve fitting
Date: Tue, 13 Oct 2009 05:15:19 +0000 (UTC)
Organization: gol
Lines: 11
Message-ID: <hb12d7$jrp$1@fred.mathworks.com>
Reply-To: "Mohammad Monfared" <gohardoust@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1255410919 20345 172.30.248.35 (13 Oct 2009 05:15:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 13 Oct 2009 05:15:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 93829
Xref: news.mathworks.com comp.soft-sys.matlab:576872


Hi,
I'd like to fit a function, f(x), to my data (x,y). 'f' has three parameter to be determined p1, p2, p3, and is of form:  

f_1(x)          0 <= x >= p1  ;
f_2(x)          p1 < x  ;

How can I do this job while have two equation for f(x) ?
( I have access to the Optimization toolbox)

thanks a lot,
Mohammad,