Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: looping issue
Date: Tue, 28 Sep 2010 05:56:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 15
Message-ID: <i7s01p$gab$1@fred.mathworks.com>
References: <i7rsj0$1ln$1@fred.mathworks.com> <i7rv9r$rvf$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1285653369 16715 172.30.248.37 (28 Sep 2010 05:56:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 28 Sep 2010 05:56:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:673778

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <i7rv9r$rvf$1@fred.mathworks.com>...
>  A = Lines(:,1)-Lines(:,3);
>  B = Lines(:,2)-Lines(:,4);
>  M = A*A.'+B*B.';
>  M(1:n=1:n^2) = [];
> 
> Roger Stafford
- - - - - - - - -
  Oops a typo!  I meant

 M(1:n+1:n^2) = [];

in the last equation.  {n is equal to size(Lines,1)}

Roger Stafford