Path: news.mathworks.com!newsfeed-00.mathworks.com!panix!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!dreaderd!not-for-mail
From: Arthur G <gorramfreak+news@gmail.com>
Newsgroups: comp.soft-sys.matlab
Date: Wed, 12 Mar 2008 22:38:50 -0400
Message-ID: <47d893bb$0$291$b45e6eb0@senator-bedfellow.mit.edu>
References: <fr9c9t$o1p$1@news.onet.pl> <fr9s1e$cee$1@fred.mathworks.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Subject: Re: Linear regression.
User-Agent: Unison/1.8
Lines: 42
NNTP-Posting-Host: VPN-NINETY-FIVE.MIT.EDU
X-Trace: 1205375932 senator-bedfellow.mit.edu 291 18.100.0.95
Xref: news.mathworks.com comp.soft-sys.matlab:456932



On 2008-03-12 20:21:02 -0400, "Paul " <par@ceri.memphis.edu> said:

> 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.

If you have the statistics toolbox, the regress function will give 95% 
confidence intervals.