Path: news.mathworks.com!not-for-mail
From: "anil chandy" <anilvchandy@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: working with matrix
Date: Mon, 16 Feb 2009 09:27:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 11
Message-ID: <gnbbh6$946$1@fred.mathworks.com>
Reply-To: "anil chandy" <anilvchandy@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1234776422 9350 172.30.248.35 (16 Feb 2009 09:27:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 16 Feb 2009 09:27:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1659629
Xref: news.mathworks.com comp.soft-sys.matlab:518532

a=1  2  3  4   
    3  4  5  7    
    2  4  5  4 
b=[4 4 4 8 8 6 6 9] 

c=[1 3 5 6 7 2 8 4] 
 here in b the same elements are grouped..   and c denotes the indices of the repeating elements in the original matrix 
d=[4 6 4 9 4 8 8 6]   
 is there any  method to take the elements of c  as indices and substitute the values of a in that place ie                          e=      1   3   1    4  1   2   2   3   
                                                              2   5   2   7  2   4   4    5    
                                                              3   5  3    4  3   4   4    5