-1
$\begingroup$

I want to plot Sin[a*x] and have used the following code:

Plot[Sin[a*x], {a,0,10},{x, 0, 10}]

But I am not getting any plot. Any Ideas?

$\endgroup$
  • 1
    $\begingroup$ What do you expect to get? Have you seen Plot documentation? $\endgroup$ – Kuba Mar 3 '19 at 14:37
  • $\begingroup$ DensityPlot[Sin[a*x], {a, 0, 10}, {x, 0, 10}, PlotLegends -> Automatic, PlotPoints -> 50] $\endgroup$ – corey979 Mar 3 '19 at 15:08
3
$\begingroup$

Are you looking for something like this?

Manipulate[Plot[Sin[a*x], {x, 0, 10}], {a, 0, 10}]

or this?

Plot[Evaluate@Table[Sin[a*x], {a, 0, 2}], {x, 0, 10}]
| improve this answer | |
$\endgroup$
  • $\begingroup$ Yes, something like the first one. Thanks $\endgroup$ – Priyesh Sharma Mar 3 '19 at 16:21
  • $\begingroup$ I tried f[max_] := Plot[Sin[a*x], {x, 0, max}] Manipulate[f[max], {a, 1, 5}, {max, 10, 20}]. But, that wasn't giving me the desired result either. Didn't understand why though $\endgroup$ – Priyesh Sharma Mar 3 '19 at 16:28
  • $\begingroup$ @Maria because mathematica.stackexchange.com/questions/10604/… $\endgroup$ – Kuba Mar 3 '19 at 18:40
1
$\begingroup$
Plot3D[Sin[a*x], {a,0,10},{x, 0, 10}]
| improve this answer | |
$\endgroup$
  • $\begingroup$ Can't I get a 2D plot? $\endgroup$ – Priyesh Sharma Mar 3 '19 at 14:36
  • 2
    $\begingroup$ There are three dimensions here: $a$, $x$, and $\sin(a x)$. Project one out and you can have a 2D plot; but you'll have to say how. $\endgroup$ – Roman Mar 3 '19 at 14:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.