Hi Rubens,
The predicate x < -10 && x > 10
(and similarly for y
) is never True
. Perhaps you meant to use ||
?
V[x_, y_] :=
Piecewise[{
{5, x < -10 || x > 10 && y < -8 || y > 8},
{0, x >= -10 || x <= 10 && y <= 8 || y >= -8}}]
Plot3D[V[x, y], {x, -15, 15}, {y, -15, 15}]
