I want to plot a discontinuous step surface. I entered this plot statement:
Plot3D[{if[x > 0, x = 0, x = 1]}, {x, 2, -2}, {y, 2, -2}]
All I get is an empty box. What went wrong?
The Problem is nothing but, you have used small "i" instead of capital "I" for If function. Its working well.
Perfect! Thank you Nasser Abbasi!
Try with If and not if But may be better to use Piecewise
If
if
Piecewise
Clear[x, y] f[x_] := Piecewise[{{0, x > 0}, {1, True}}]; Plot3D[f[x], {x, 2, -2}, {y, 2, -2}, Exclusions -> None]