1 hour later…
3 hours later…
15:55
Can somebody tell me why Mathematica fails to use Plot inside a Block Block[{vars, eq, ineqs}, vars = Complement[{x, y, z}, {y, z}]; eq = 5 x + 3; ineqs = x > 2 && x < 5; If[Length[vars] == 1, Plot[eq, {vars} \[Element] ImplicitRegion[ineqs, vars]]]]
the above produces errors, whereas
Plot[5 x + 3, {x} \[Element] ImplicitRegion[x > 2 && x < 5, {x}]]
plots fine
Plot[5 x + 3, {x} \[Element] ImplicitRegion[x > 2 && x < 5, {x}]]
plots fine
6 hours later…
21:37
@ThunderBiggi Welcome to the world of how Mathematica evaluates things. Look at this simple example:
Block[{x, y, z, vars, ineqs}, vars = Complement[{x, y, z}, {y, z}]; ineqs = x > 2 && x < 5; ImplicitRegion[ineqs, vars] ]
This happens on multiple levels in your short example and the reason it fails has nothing to do with
Block
. You need to carefully evaluate certain things when you want to plot something like this using variables instead of putting the equations and regions directly into the expression. « first day (3307 days earlier) ← previous day next day → last day (1475 days later) »