I was expecting 10 Plots to appear?Code:`Clear[f]`

f[t_, i_] := (1000*20)/((1000 - 20)*E^(-(1 + 0.2 i)*t) + 20)

Do[

Plot[f[t, i], {t, 0, 3}, PlotRange -> {{0, 3}, {0, 1000}}],

{i, 1, 10}]

Printable View

- May 14th 2009, 01:50 PMtollandmathematica - why is this Do loop not producing any output?Code:
`Clear[f]`

f[t_, i_] := (1000*20)/((1000 - 20)*E^(-(1 + 0.2 i)*t) + 20)

Do[

Plot[f[t, i], {t, 0, 3}, PlotRange -> {{0, 3}, {0, 1000}}],

{i, 1, 10}]

- May 15th 2009, 02:54 AMMikeCroucherIt's a long story. The practical upshot is that you could try this

Code:`Clear[f]`

f[t_, i_] := (1000*20)/((1000 - 20)*E^(-(1 + 0.2 i)*t) + 20)

Do[Print[Plot[f[t, i], {t, 0, 3},

PlotRange -> {{0, 3}, {0, 1000}}]], {i, 1, 10}]

Mike

www.walkingrandomly.com

- May 15th 2009, 02:59 AMtolland
- May 15th 2009, 03:08 AMMikeCroucher
The tutorial you copied it from is almost certainly pre v6.0. Wolfram changed the graphics model completely when they moved to version 6 and most of the time the only thing you'll notice is that plotting is massively better.

Sometimes though, the changes break old code and this is one of those times. More details can be found in the following mathform thread

MathGroup Archive: June 2007 [01202]

Cheers,

Mike

www.walkingrandomly.com - May 15th 2009, 03:37 AMtolland