Re: Do command
- To: mathgroup at smc.vnet.net
- Subject: [mg120659] Re: Do command
- From: Peter Breitfeld <phbrf at t-online.de>
- Date: Wed, 3 Aug 2011 07:04:27 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <j18m27$slc$1@smc.vnet.net>
"DaleJenk" wrote: > I'm working my way through the 1999 edition of Mathematica Navigator and > using Mathematica 7 Home Edition. The following command is supposed to bring > up a plot but for some reason it doesn't. > > Do[Plot[Sin[x - c], {x, 0, 4 Pi, Pi/10}, Ticks -> None], {c, 0, > 2 Pi - Pi/10, Pi/10}] > > Thanks for any help. First, the range specification for Plot is wrong. Plot expects three Elements, not four. So it should be Do[Plot[Sin[x - c], {x, 0, 4 Pi}, Ticks -> None], {c, 0, 2 Pi - Pi/10, Pi/10}] But this will give you no output too, because Do returns Null (nothing). You can do the following: Do[Print@Plot[Sin[x - c], {x, 0, 4 Pi}, Ticks -> None], {c, 0, 2 Pi - Pi/10, Pi/10}] or Table[Plot[Sin[x - c], {x, 0, 4 Pi}, Ticks -> None], {c, 0, 2 Pi - Pi/10, Pi/10}] -- _________________________________________________________________ Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de