Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #14028

Re: what is wrong with this code?

From psycho_dad <s.nesseris@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: what is wrong with this code?
Date 2013-04-03 08:07 +0000
Message-ID <kjgo06$pu2$1@smc.vnet.net> (permalink)
References <kje13u$grc$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


You're just seeing some artifacts. Increasing the plotpoints gives a better looking plot:

f[x_] := If[EvenQ[IntegerPart[x]], 0.4, 0.8];
Plot[f[x], {x, 1, 101}, PlotRange -> {0, 1}, PlotPoints -> 69] 

BTW, next time try to be a bit more descriptive than just "what's wrong with this", OK? 

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

what is wrong with this code? dougwangsaif@gmail.com - 2013-04-02 07:24 +0000
  Re: what is wrong with this code? psycho_dad <s.nesseris@gmail.com> - 2013-04-03 08:07 +0000
  Re: what is wrong with this code? Peter Pein <petsie@dordos.net> - 2013-04-03 08:08 +0000

csiph-web