Mathematica version 11.0 does not (yet) support threading of an expression like
mathematica Copy code
Thread[{γ, δ, pa, pf, pr, pe, pp, pwf, pwd} Degree ∈
Interval[{{-90, 90}, {0, 180}, {0, 200}, {-20, 180}, {-90, 90}, {0, 150}, {0, 180}, {-90, 90}, {-45, 45}}]]
so one common solution was to “unroll” the threading. That is, you write each joint range separately. For example, one acceptable answer was
mathematica Copy code
jointRanges = {
Element[γ Degree, Interval[{-90 Degree, 90 Degree}]],
Element[δ Degree, Interval[{0 Degree, 180 Degree}]],
Element[pa Degree, Interval[{0 Degree, 200 Degree}]],
Element[pf Degree, Interval[{-20 Degree, 180 Degree}]],
Element[pr Degree, Interval[{-90 Degree, 90 Degree}]],
Element[pe Degree, Interval[{0 Degree, 150 Degree}]],
Element[pp Degree, Interval[{0 Degree, 180 Degree}]],
Element[pwf Degree, Interval[{-90 Degree, 90 Degree}]],
Element[pwd Degree, Interval[{-45 Degree, 45 Degree}]]
};
Here, note that each numerical bound is multiplied by Degree so that the numbers are converted to radians (since in Mathematica 1 Degree = π/180). (In later versions of Mathematica the threaded form may work directly, but in 11.0 you need to write it this way.)
Alternative via MapThread
If you prefer a more “compact” solution that still works in 11.0, you can use MapThread. For example:
mathematica Copy code
vars = {γ, δ, pa, pf, pr, pe, pp, pwf, pwd};
bounds = {
{-90, 90},
{0, 180},
{0, 200},
{-20, 180},
{-90, 90},
{0, 150},
{0, 180},
{-90, 90},
{-45, 45}
};
jointRanges = MapThread[
Element[#1 Degree, Interval[{#2[[1]] Degree, #2[[2]] Degree}]] &,
{vars, bounds}
];
This code creates the same list of conditions as the first solution.
Either solution will run in Mathematica 11.0.