MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How come doesn't this work?


Anolethron wrote:
> I know I have to put Evaluate In but it doesn't work still.
> Taylor[n_] := Normal[Series[ArcTan[x], {x, 0, n}]]
> 
> F = ArcTan[x]
> Grafico[n_] =
> Plot[{F, Taylor[n]} // Evaluate, {x, -Pi, Pi},
> DisplayFunction -> $DisplayFunction]

Define Graphico with SetDelayed (as you have done for Taylor) rather 
than Set.

Taylor[n_] := Normal[Series[ArcTan[x], {x, 0, n}]]
F = ArcTan[x];
Clear[Grafico]
Grafico[n_] := Plot[Evaluate[{F, Taylor[n]}],
    {x, -Pi, Pi}, DisplayFunction -> $DisplayFunction]
Grafico[4];

Regards,
Jean-Marc


  • Prev by Date: Re: How come doesn't this work?
  • Next by Date: Mathematica 6 Graphics Options
  • Previous by thread: Re: How come doesn't this work?
  • Next by thread: Re: How come doesn't this work?