Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!newsfeed00.sul.t-online.de!t-online.de!news.nask.pl!news.nask.org.pl!news.onet.pl!not-for-mail
From: Zebbik <zebik@op.pl>
Newsgroups: comp.soft-sys.matlab
Subject: Linear regression.
Date: Wed, 12 Mar 2008 19:52:24 +0000
Organization: Onet.pl
Lines: 27
Message-ID: <fr9c9t$o1p$1@news.onet.pl>
NNTP-Posting-Host: acc930b5.ipt.aol.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.onet.pl 1205351549 24633 172.201.48.181 (12 Mar 2008 19:52:29 GMT)
X-Complaints-To: usenet@news.onet.pl
NNTP-Posting-Date: Wed, 12 Mar 2008 19:52:29 +0000 (UTC)
X-Sender: Bp2tzS8CFS8FGDaD6qs7Hg==
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
Xref: news.mathworks.com comp.soft-sys.matlab:456888



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.