Thread Subject: sorting of array of object

Subject: sorting of array of object

From: Syed

Date: 28 Oct, 2009 17:53:03

Message: 1 of 2

Hi!

Anybody can give me any hint to sort an array of objects. I have array of boxes and every box has its numeric label. The array is containing different object of box class. I want to sort array according to label of box.

Thanks in advance.
/Hasan

Subject: sorting of array of object

From: ade77

Date: 4 Nov, 2009 00:14:04

Message: 2 of 2

can you expand on your problem, the labels on the box are they regular string expression? so you want to sort based on the string expression.
For example, if box1 = 'peter' ; box2 = 'james' ; box 3 = 'john', then if you sort you will have
[box2 box3 box1]. is that what you mean?

"Syed " <cancer216@hotmail.com> wrote in message <hca0dv$pkr$1@fred.mathworks.com>...
> Hi!
>
> Anybody can give me any hint to sort an array of objects. I have array of boxes and every box has its numeric label. The array is containing different object of box class. I want to sort array according to label of box.
>
> Thanks in advance.
> /Hasan

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
object oriented Hasan Yousuf 28 Oct, 2009 13:54:03
array of objects Hasan Yousuf 28 Oct, 2009 13:54:03
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com