Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Split command for version 2.0' topicStudent Support Forum > General > "Split command for version 2.0"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Aaron Honecker
09/18/00 2:37pm

>I'm using Mathematica 2.0, a handed-down (and out-dated) version. I would like to use the Split command of later versions, which is apparently absent in my version. Could anyone tell me how to define the Split command in Mathematica 2.0? I would really appreciate it. Thank you.

Here's one way to build a Split command

Split[$x_List] := Module[{X = {{}}},
Fold[(If[MemberQ[X[[-1]], #2], X[[-1]] = Join[X[[-1]], {#2}],
AppendTo[X, {#2}]]) &, X, $x];
Drop[X, 1]
]

URL: ,

Subject (listing for 'Split command for version 2.0')
Author Date Posted
Split command for version 2.0 Brian Park 09/16/00 10:34am
Re: Split command for version 2.0 Aaron Honecker 09/18/00 2:37pm
< Previous CommentHelp | Reply To Comment | Reply To Topic