Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: no_repeated_digits_in_row
Date: Mon, 30 Aug 2010 16:41:20 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 28
Message-ID: <i5gmvg$46m$1@fred.mathworks.com>
References: <i5fjq1$spb$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1283186480 4310 172.30.248.38 (30 Aug 2010 16:41:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 30 Aug 2010 16:41:20 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:666214

"Kate " <chino_tones@hotmail.com> wrote in message <i5fjq1$spb$1@fred.mathworks.com>...
> Hi guys,
> 
> requesting some help again...........
> 
> I have matrix = 
> 
> A = [ 10 10  4 ;
>         3   2   1 ;
>         67  5   5;
>         45  38   9
>         1     6   3]
> 
> I want the output such that  it 'filters' rows where there are NO repeated digits within that row.
> 
> So my ideal answer would be:
> 
> Answer = [ 3   2    1;
>                 45   38  9
>                  1    6    3]
> 
> Any help welcome....
> 
> Kate
- - - - - - - -
Answer = A(all(diff(sort(A,2),1,2),2),:);

Roger Stafford