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

Contact us at files@mathworks.com