Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #14008
| From | Peter Pein <petsie@dordos.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: IntegerPart |
| Date | 2013-04-02 07:25 +0000 |
| Message-ID | <kje15v$gvv$1@smc.vnet.net> (permalink) |
| References | <kjb430$8jc$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
Am 01.04.2013 06:57, schrieb dougwangsaif@gmail.com:
> can anyone help with this. There seems to be something wrong with the IntegerPart function. Please help!
>
> Clear["Global`*"]
> nSize = 100;
>
> prefstate = Table[0, {i, 1, nSize}];
> Do[
> {prefstate[[i]] = If[EvenQ[i], 0.8, 0.4]},
> {i, 1, nSize}
> ];
>
> Plot[{prefstate[[IntegerPart[x]]]}, {x, 1, nSize + 1},
> AxesOrigin -> {0, 0}, TicksStyle -> Directive[18],
> PlotStyle -> {Black}]
>
Hi,
the Plot-algorithm simply selects too few supporting points. Adding
the rule PlotPoints -> nSize + 3 to the call to Plot[] will show the
complete graph.
Peter
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
IntegerPart dougwangsaif@gmail.com - 2013-04-01 04:57 +0000 Re: IntegerPart debguy <johnandsara2@cox.net> - 2013-04-02 07:25 +0000 Re: IntegerPart Peter Pein <petsie@dordos.net> - 2013-04-02 07:25 +0000 Re: IntegerPart debguy <johnandsara2@cox.net> - 2013-04-03 07:22 +0000
csiph-web