| 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: , |
|