pattern matching - How do I use ">" and "<" inside "Cases" Mathematica function? -
how utilize ">" , "<" within "cases" mathematica function?
e.g., cases end in greater 2 next nested list:
lst = { {1, 0, 0}, {1, 1, 1}, {1,1,4} }
i like
cases[lst, {_, _,>2} ]
what right way express ">2" above?
the straightforward prepare approach probably
cases[lst, {_, _, x_ /; x > 2}]
see documentation /;
or condition
.
wolfram-mathematica pattern-matching
No comments:
Post a Comment