MathGroup Archive 2006

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

Search the Archive

Re: Drawing function with 3 variables in a graph

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71848] Re: Drawing function with 3 variables in a graph
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 1 Dec 2006 06:21:47 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <ekmefu$8hs$1@smc.vnet.net>

royend at gmail.com wrote:
> I want to draw a fairly complex function several times in one graph. By
> using different colour I hope to present the development of my function
> as the three variables changes.
> 
> Earlier I have managed two variabels by using this:
> Plot[Evaluate[ { Table[ f[t,m], {m,0,5}] } ], {t,-20,20},
> PlotStyle->etc]
> 
> But this time I have met difficulties because one of my variables are
> "hidden" inside the function f(t,m), like this:
> g(a) = a/2
> f(t) = m*g(a)^t
> m,a and t are variables.
> 
> Therefore I need to control 3 variables and have tried this:
> With[ {a=5}, Plot[ same as above]....
> 
> I have read some about lists, graphics and so on but still haven't been
> able to find any solution. 
> Do you have any tips for solving this?
> 

A replacement rule for a, perhaps?

g[a_] := a/2
f[t_, m_] := m*g[a]^t
Plot[Evaluate[{Table[f[t, m], {m, 0, 5}] /. a -> 5}], {t, -20, 20}];
Plot[Evaluate[{Table[f[t, m], {m, 0, 5}] /. a -> 2}], {t, -20, 20}];

Regards,
Jean-Marc


  • Prev by Date: Re: Use pattern to find minimum without using min
  • Next by Date: NIntegrate that upper limit is infinite
  • Previous by thread: Re: Use pattern to find minimum without using min
  • Next by thread: Re: Drawing function with 3 variables in a graph