Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Complex Matrix Row Deletion Date: Sun, 17 Jul 2011 18:00:10 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 34 Message-ID: <ivv7va$kan$1@newscl01ah.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: www-04-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: newscl01ah.mathworks.com 1310925610 20823 172.30.248.35 (17 Jul 2011 18:00:10 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Sun, 17 Jul 2011 18:00:10 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 2665872 Xref: news.mathworks.com comp.soft-sys.matlab:736547 Hi all, My problem is as follows: - I have a large matrix which may be exemplified in the following manner A = [1 1 23 1 1 24 1 -1 34 1 -1 45 2 1 77 2 1 12 2 -1 4 ] - My aim is to analyse the elements in the third column for each set where the values in column 1 and 2 are equal. - Upon analysing, I need to delete the row which has the smallest value in column 3. For example, applying this to matrix A The first set is [ 1 1 23 1 1 24] hence deleting the first row Matrix A thus becomes A = [ 1 1 23 1 -1 34 2 1 12 2 -1 4] Thanks a lot for any help, Regards, F