Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Draw two functions in a graph, one of them does also have a parameter.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90193] Re: Draw two functions in a graph, one of them does also have a parameter.
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Wed, 2 Jul 2008 05:28:13 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <g4d2ut$er8$1@smc.vnet.net>

Felipe Mannshardt wrote:

> Is there a way to do a Plot do draw this two functions in the same graph ?
> I am asking because i am having problems due the parameter  "a".
> 
> I have,
> 
> f(x)= -x^2 + 6x
> g(x)= ax
> 
> i want to draw them in the same graphic and with a from 0 to 3 . . .
> 
> Can not think of a way of doing this, due the "a" parameter . . .
> 
> Plot[{f[x],[g[a][x]},{x,0,7},{a,0,3}]

<snip>

Not sure whether this is what you are looking for:

f[x_] = -x^2 + 6*x;
g[x_] = a*x;
Table[Plot[{f[x], g[x]}, {x, 0, 7}], {a, 0, 3}]

Regards,
-- Jean-Marc


  • Prev by Date: Re: Draw two functions in a graph, one of them does also have a
  • Next by Date: Is Format[ ,TeXForm] broken?
  • Previous by thread: Re: Draw two functions in a graph, one of them does also
  • Next by thread: Re: Draw two functions in a graph, one of them does also have a parameter.