Recent content by TenFold
-
T
Mathematica Mathematica: Splitting a function into a list of terms
Maybe it's not too slick, but I came up with this: myString = "a+b-c-d"; If[StringTake[myString, 1] != "-", myString = "+" <> myString,]; list = StringSplit[myString, {"+" -> "1", "-" -> "-1"}]; listout = Range[Length[list]/2]; For[i = 1, i <= Length[list]/2, i++, listout[[i]] =...- TenFold
- Post #2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
T
Mathematica Mathematica: Splitting a function into a list of terms
Hi, I need to split an expression into a list of terms, i.e. an expression like: a+b-c-d+... into: {a,b,-c,-d,...}. Can you help? Thanks in advance.- TenFold
- Thread
- Function List Mathematica Splitting Terms
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX