On 4/2/13 at 3:24 AM, dougwangsaif at gmail.com wrote:
>f[x_] := If[EvenQ[IntegerPart[x]], 0.4, 0.8]; Plot[f[x], {x, 1,
>101}]
Nothing. But if you are expecting the plot to be a square wave
you will need to change the defaults that determine how plot
samples the function f. Read the documentation for Plot. Pay
particular attention to options PlotPoints and MaxRecursion.