Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: best fit line through coordinates
Date: Sat, 16 Oct 2010 18:03:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 9
Message-ID: <i9cpcn$mjr$1@fred.mathworks.com>
References: <i9bf4s$9dq$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1287252183 23163 172.30.248.35 (16 Oct 2010 18:03:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 16 Oct 2010 18:03:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:679016

"Kurt " <rerty258@gmail.com> wrote in message <i9bf4s$9dq$1@fred.mathworks.com>...
> .........
> 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?
> .......
- - - - - - - - -
  For best orthogonal fit, rearrange coordinates in the form [x1,y1;x2,y2;x3,y3,x4,y4] and use 'svd'.

Roger Stafford