Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Linear regression.
Date: Thu, 13 Mar 2008 00:21:02 +0000 (UTC)
Organization: University of Memphis
Lines: 36
Message-ID: <fr9s1e$cee$1@fred.mathworks.com>
References: <fr9c9t$o1p$1@news.onet.pl>
Reply-To: <HIDDEN>
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 1205367662 12750 172.30.248.35 (13 Mar 2008 00:21:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 13 Mar 2008 00:21:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 233092
Xref: news.mathworks.com comp.soft-sys.matlab:456927



Zebbik <zebik@op.pl> wrote in message
<fr9c9t$o1p$1@news.onet.pl>...
> Hello.
> 
> My problem is that I am supposed to find trend line
/regression of from 
> the results made in experiment. I know
> 
> p = polyfit(x,y,1)
> 
> gives me coefficients of line (the correlation is strong
almost 1 so 
> it's linear tendency), where in terms of y = mx + c
> 
> p(1) - slope (m)
> p(2) - 'c' coefficient
> 
> I know also that
> 
> yfit = polyval(p, y)
> 
> gives me the fit of line such that it's going to be linear
reggresion.
> 
> Now. The value im looking for is the slope. I would like
to find the 
> slope itself with the error or let's say Delta that the
slope could 
> differ arround like
> (Slope - Delta_Slope, Slope + Delta_Slope)
> 
> Does any1 know how to do that?
> 
> Thanks.

I suggest you search the file exchange.