Message Boards Message Boards

0
|
2287 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

How to use the Runs function in Version 13.3

Posted 1 year ago

POSTED BY: Harlan Brothers
2 Replies
Posted 1 year ago

Looks like the inbuilt function Split could also be used:

p={4,2,1,10,3,5,6,13,12,9,15,11,7,8,14};

Split[p,#2>#1&]

(* {{4},{2},{1,10},{3,5,6,13},{12},{9,15},{11},{7,8,14}} *)
POSTED BY: Hans Milton

What a fast, efficient, and elegant solution! Thanks for sharing this, Hans!

POSTED BY: Harlan Brothers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract