Path: news.mathworks.com!newsfeed-00.mathworks.com!solaris.cc.vt.edu!news.vt.edu!news.glorb.com!feeder.erje.net!news.ecp.fr!aioe.org!.POSTED!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: I want answer
Date: Wed, 18 Apr 2012 22:03:57 -0500
Organization: Aioe.org NNTP Server
Lines: 44
Message-ID: <jmnvat$dfr$1@speranza.aioe.org>
References: <jmntup$hqc$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: burFYlkLdfXuSpQB8NXLKw.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1
X-Notice: Filtered by postfilter v. 0.8.2
Xref: news.mathworks.com comp.soft-sys.matlab:765087

On 4/18/2012 9:40 PM, khalil wrote:
> How I can remove rows from matrix each elemnts in these rows are equals
> Ex:
> m=[1 2 3;1 1 1;4 5 8;4 5 8;1 1 1;1 1 1;1 1 1;1 1 1;1 1 1;1 1 1;1 1 1;1 1 1;4 5 8;7 8 5; 47 9 5;7 8 5;5 322 5;7 8 55];

m =

      1     2     3
      1     1     1
      4     5     8
      4     5     8
      1     1     1
      1     1     1
      1     1     1
      1     1     1
      1     1     1
      1     1     1
      1     1     1
      1     1     1
      4     5     8
      7     8     5
     47     9     5
      7     8     5
      5   322     5
      7     8    55

-----------------------
r=cell2mat(arrayfun(@(i) length(unique(m(i,:))),1:length(m),'UniformOutput',false));
m(r~=1,:)
--------------------------

      1     2     3
      4     5     8
      4     5     8
      4     5     8
      7     8     5
     47     9     5
      7     8     5
      5   322     5
      7     8    55


--Nasser