From: Jan Simon on
Dear Matt, dear Us,

> How about a drunk and angry armadillo with a hatred of multiple lines?
>STR(cell2mat(cellfun(@(x)x(1)-diff(x)-1:x(2),regexp(STR,'(<)+','tokenExtents'),'Un',0))) = ''

I know this kind of programming:
Remove the keys from some old laptops, fill them from the wide side into a vuvuzela and shake it. Open the small hole and let one key after the other drop out. Repeat this until the line produces the wanted result (ask the COMBINATOR for the number of drinks you will need).

However, I like this solution, although it does not contain a CUMSUM, but at least CELLFUN and DIFF.
'Un', 0 ))) = ''
What a finale.

Jan
From: Matt Fig on
"Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <i1b40s$7tj$1(a)fred.mathworks.com>...
> Dear Matt, dear Us,
>
> > How about a drunk and angry armadillo with a hatred of multiple lines?
> >STR(cell2mat(cellfun(@(x)x(1)-diff(x)-1:x(2),regexp(STR,'(<)+','tokenExtents'),'Un',0))) = ''
>
> I know this kind of programming:
> Remove the keys from some old laptops, fill them from the wide side into a vuvuzela and shake it. Open the small hole and let one key after the other drop out. Repeat this until the line produces the wanted result (ask the COMBINATOR for the number of drinks you will need).
>
> However, I like this solution, although it does not contain a CUMSUM, but at least CELLFUN and DIFF.
> 'Un', 0 ))) = ''
> What a finale.
>
> Jan


And the best part is: its self documenting ;-). LOL