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


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

Re: Do command

From "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Do command
Date 2011-08-03 11:16 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j1bamq$aoh$1@smc.vnet.net> (permalink)
References <j18m27$slc$1@smc.vnet.net>

Show all headers | View raw


On Tue, 02 Aug 2011 12:12:07 +0100, DaleJenk  
<dale.jenkins8@deletegooglemail.com> 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.
>

Do[
  Print@Plot[Sin[x - c], {x, 0, 4 Pi}, Ticks -> None],
  {c, 0, 2 Pi - Pi/10, Pi/10}
]

But this is probably more like what was intended:

Reap@Do[
  Sow@Plot[Sin[x - c], {x, 0, 4 Pi}, Ticks -> None],
  {c, 0, 2 Pi - Pi/10, Pi/10}
] // Flatten // ListAnimate

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


Thread

Do command "DaleJenk" <dale.jenkins8@deletegooglemail.com> - 2011-08-02 11:12 +0000
  Re: Do command Peter Breitfeld <phbrf@t-online.de> - 2011-08-03 11:05 +0000
  Re: Do command "andre.robin3" <andre.robin3@wanadoo.fr> - 2011-08-03 11:06 +0000
  Re: Do command "Dr. Wolfgang Hintze" <weh@snafu.de> - 2011-08-03 11:10 +0000
  Re: Do command "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-08-03 11:16 +0000

csiph-web