0
$\begingroup$

Possible Duplicate:
How do I use Map for a function with two arguments?

I have a function, e.g. $T(x,t) = \exp(-t)\sin(x)$ and I want to plot, on the same, or different graphs, $T$ as a function of $x$, for an array of $t$ values.

$\endgroup$
3
  • 1
    $\begingroup$ Search for Plot in the docs. And Table, Map or Range to build the array $\endgroup$ Commented Oct 27, 2012 at 19:37
  • $\begingroup$ You might also want to see this. $\endgroup$ Commented Oct 27, 2012 at 19:42
  • $\begingroup$ You might also try things like: Manipulate[Plot[Exp[-t]Sin[x],{x,-4Pi,4Pi},PlotRange->{-E,E}],{t,-1,1}] $\endgroup$ Commented Oct 27, 2012 at 19:52

2 Answers 2

3
$\begingroup$

Here is an approach that should work. It shows how to plot the one parameter family of functions all together or separately. Note that, although the separate plots look the same, the scales are different.

enter image description here

$\endgroup$
2
$\begingroup$

Here's one way, plot T as a function of both t and x:

 Plot3D[Exp[-t] Sin[x], {t, 0, 5}, {x, -2 Pi, 2 Pi}, PlotRange -> All] 

Another way is to build a function T[t] for each x, then plot the ones you want

 T[t_] := Table[Exp[-t] Sin[x], {x, -2 Pi, 2 Pi, 0.01}]; ListPlot[{T[0], T[0.5], T[1], T[1.5], T[2], T[2.5], T[3]}] 
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.