Re: Sort a list with hierarchy
- From: "Matt Fig" <spamanon@xxxxxxxxx>
- Date: Thu, 14 Aug 2008 02:37:01 +0000 (UTC)
It is sort of hard to tell what you want because the
newsreader deblanked your strings. I think this does it.
asm = { 'box';
' apple';
' pear';
' banana';
' apricot';
' kiwi';
' blueberry';
' pear';
' banana';
' apricot';
' kiwi';
' orange';
' orange';
' grape';
' plum';
' peach'}
srt = sort(byindent)
[idx,idx] = sort(cellfun(@length,strfind(srt,' ')))
byindent = srt(idx)
.
- Follow-Ups:
- Re: Sort a list with hierarchy
- From: Matt Fig
- Re: Sort a list with hierarchy
- References:
- Sort a list with hierarchy
- From: Matthew
- Sort a list with hierarchy
- Prev by Date: Re: problem with fzero convergence
- Next by Date: Re: transpose
- Previous by thread: Sort a list with hierarchy
- Next by thread: Re: Sort a list with hierarchy
- Index(es):
Relevant Pages
|