Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Remove rows with repeated numbers except for zeros
Date: Thu, 9 Jun 2011 17:56:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <isr1fk$eu8$1@newscl01ah.mathworks.com>
References: <iso4re$5mi$1@newscl01ah.mathworks.com> <isou90$jui$1@newscl01ah.mathworks.com> <isqva8$84s$1@newscl01ah.mathworks.com> <isr0dh$bjg$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1307642164 15304 172.30.248.46 (9 Jun 2011 17:56:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 9 Jun 2011 17:56:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:731103

"Steven_Lord" <slord@mathworks.com> wrote in message <isr0dh$bjg$1@newscl01ah.mathworks.com>...
> "Philipp " <phil-mayer@web.de> wrote in message 
> news:isqva8$84s$1@newscl01ah.mathworks.com...
> > @Roger: Your assumptions are absolutely correct and your code does exactly 
> > what I want. I really don't know how you geniuses are able to code the 
> > solution of such a problem in only 3 lines.
> Practice, practice, and even more practice.
> Steve Lord
- - - - - - - - - -
  Awww, you spoiled it, Steve.  Just for a tiny instant there I was a "genius".  ;-)

  Actually it could have been squeezed down to just two lines:

 t = sort(A,2);
 new_A = A(all(diff(t,1,2)~=0|t(:,1:end-1)==0,2),:);

but it becomes even harder to decipher.

Roger Stafford