[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cell arrays of strings in "sort" and "unique"
From: |
David Bateman |
Subject: |
Re: Cell arrays of strings in "sort" and "unique" |
Date: |
Tue, 14 Sep 2004 23:09:50 +0200 |
User-agent: |
Mutt/1.4.1i |
Moving this discusson to maintainers as it seems to go a bit beyond
help :-)
> Although Octave doesn't support classes in the same way as Matlab, I
> think we should probably fix sort to handle cell arrays in a
> compatible way, even if that means we have to add another case to
> Fsort.
I thought this was a bit crufty as a solution. However, given that the
basic sorting code is written as a template it would be relatively
painless to add sorting of cell arrays of strings as well. Should
probably clean up sort.cc in any case since the NDArray, complexNDArray
and charNDArray stuff might also be written as a template.
In any case, looking at
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/sort.html
it seems that matlab has also added a "mode" flag that can define
ascending or descending sorted order. Which again is relatively easy
to add, but again more work :-(
However, if we are going to this level of compatiability, maybe we
should also revisit the complex sorting code and the decision to do
the sorting only on the absolute value rather than in a matlab
compatiable way. Then again maybe not as sorting non ordinate values
doesn't make much sense in any case.
>What about structs? Does Matlab also have a special sort method for
>those?
Matlab doesn't seem to sort structs...
D.
--
David Bateman address@hidden
Motorola CRM +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
- Re: Cell arrays of strings in "sort" and "unique",
David Bateman <=
- Re: Cell arrays of strings in "sort" and "unique", John W. Eaton, 2004/09/14
- Re: Cell arrays of strings in "sort" and "unique", David Bateman, 2004/09/15
- Re: Cell arrays of strings in "sort" and "unique", Quentin Spencer, 2004/09/15
- Re: Cell arrays of strings in "sort" and "unique", David Bateman, 2004/09/15
- Re: Cell arrays of strings in "sort" and "unique", Alois Schloegl, 2004/09/15
- Re: Cell arrays of strings in "sort" and "unique", John W. Eaton, 2004/09/15
- Re: Cell arrays of strings in "sort" and "unique", Alois Schloegl, 2004/09/16
Re: Cell arrays of strings in "sort" and "unique", David Bateman, 2004/09/15