Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to plot 2 fitting lines in 1 dataset?
Date: Sun, 7 Jun 2009 12:31:01 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 19
Message-ID: <h0gbu5$ssj$1@fred.mathworks.com>
References: <h0bk5u$cha$1@fred.mathworks.com> <h0buhq$832$1@fred.mathworks.com> <h0epld$lkf$1@fred.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1244377861 29587 172.30.248.38 (7 Jun 2009 12:31:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 7 Jun 2009 12:31:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:545319


"Kuo-Hsien" <mchangks@hotmail.com> wrote in message <h0epld$lkf$1@fred.mathworks.com>...
> Hi Lorenzo,
> What do you just mean logical indexing? My data point is spread out from 0-50 with temperature, but two group of data points increase with me in different rate with temperature.  

Do you know where the break occurs? 

If you do, then split this into two problems. In
fact they can be solved in one estimation step.

If not then you need to use a tool that can find the
location of the break. This is sometimes known as a
free knot spline, here a piecewise linear spline. Either
problem can be solved easily enough, but the solution
depends on your answer.

So, do you know the location of the break or must
it be estimated?

John