Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 16 Oct 2010 10:12:31 -0500
From: Richard Startz <richardstartz@comcast.net>
Newsgroups: comp.soft-sys.matlab
Subject: Re: best fit line through coordinates
Date: Sat, 16 Oct 2010 08:12:36 -0700
Message-ID: <m6gjb6pccphhgohp49esbv8164b13lt25k@4ax.com>
References: <i9bf4s$9dq$1@fred.mathworks.com> <i9bgg3$3c4$1@fred.mathworks.com>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 29
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-yScOVxdKNa/chJ3nOTw+xsEkgtdTFVC68Rr5bpATRmL+GP5FGXvdSB6MWeWoD5HMLiO1TqzCYH24dRZ!1U4FBp+GVN9Naplgs7usGGsrRR8L1/a2gJb87YUv4Rm0cZ2kpP0ndib2MSkeLVGONE0TMkM=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 1962
Xref: news.mathworks.com comp.soft-sys.matlab:678988

On Sat, 16 Oct 2010 06:25:07 +0000 (UTC), "Stuart "
<imanotarat@gmail.com> wrote:

>Go look up the demo on the function polyfit, u can tell it to make a first order regression of those points which would be the line of best fit
>
>
>"Kurt " <rerty258@gmail.com> wrote in message <i9bf4s$9dq$1@fred.mathworks.com>...
>> Hi guys,
>> 
>> I have an issue I'd like some help with.
>> 
>> 
>> coordinates =
>> 
>>                     107.35                       107                    111.51                       146
>>                        117                    154.61                    111.29                       114
>> 
>> 
>> In the above matrix 'coordinates', its actually in the form [ x1 y1 x2 y2] for each of the 2 rows.
>> 
>> Is there any function I can obtain a best fit line using these 4 points?
>> 
>> 
>> thanks
>> Kurtis

or

help backslash