Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: sorting cell
Date: Sun, 28 Jun 2009 07:23:00 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 12
Message-ID: <h275ok$k2j$1@fred.mathworks.com>
References: <9053934.40651.1246168902401.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
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 1246173780 20563 172.30.248.35 (28 Jun 2009 07:23:00 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 28 Jun 2009 07:23:00 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:551167


parham <parham_iut@yahoo.com> wrote in message <9053934.40651.1246168902401.JavaMail.jakarta@nitrogen.mathforum.org>...
> hi
> I have a problem.I have a cell wich is in below, and as you see its size is 1*3
>  
> c={{83 85 84 86 86 86 94 83 83 }{19 20 19 12 16 15 13 18 15} {'b' 'c' 'a' 't' 'f' 'r' 'd' 'r' 'x'}}
> fierst column is entrance year and second is average.How can I sort this cell according to entrance year and if the entrance year are equal then it sorts according to average.for example
> c={{83 83 83 84 85 86 86 86 94}{15 18 19 19 20 12 15 16 15}{{'b' 'c' 'a' 't' 'f' 'r' 'd' 'r' 'x'}}
> thanks in advance

Use SORT or SORTROWS, both require a formatting of your data first.

Bruno