MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: what is wrong with this code?


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.




  • Prev by Date: Locators: Retrieve coordinates data to added locators
  • Next by Date: Re: what is wrong with this code?
  • Previous by thread: Re: what is wrong with this code?
  • Next by thread: Re: what is wrong with this code?