Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Substitution ignored?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48750] Re: Substitution ignored?
  • From: "David W. Cantrell" <DWCantrell at sigmaxi.org>
  • Date: Sat, 12 Jun 2004 23:33:39 -0400 (EDT)
  • References: <cadvom$6ts$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Jos R Bergervoet <Jos.Lastname at Companyname.com> wrote:
> Dear MathGroup,
>
> Why is the following going wrong?
>
> f = x^2
> Plot[{  f,  f /. x->x-1  }, {x,0,2}]  (* Identical functions plotted!! *)

Your two different functions can be plotted using

  Plot[Evaluate[{ f, f /. x -> x - 1 }], {x, 0, 2}]

David

> g = f /. x->x-1
> Plot[{f, g}, {x,0,2}]             (* OK, different functions plotted *)


  • Prev by Date: Rotated X-Labels
  • Next by Date: Re: How to plot a direction field?
  • Previous by thread: Re: Substitution ignored?
  • Next by thread: Re: Substitution ignored?