2
$\begingroup$

It just plots a blank

    y[x_, \[Alpha]_, v_] = x*Tan[\[Alpha]] - 0.5*g*(x/(v*Cos[\[Alpha]]))^2

    Manipulate[ Plot[y[x, \[Alpha], v] , {x , 0 , 10 }], {\[Alpha] , 0 , Pi/2 } , {v , 0 , 10} ] /. g -> 9.8

Honestly not sure why...maybe I'm just too tired to see the mistake.

$\endgroup$
7
  • $\begingroup$ Manipulate[ Plot[y[x, \[Alpha], v] /. g -> 9.8, {x, 0, 10}], {\[Alpha], 0, Pi/2}, {v, 0.0000001, 10}] $\endgroup$ Commented Aug 4, 2016 at 19:37
  • $\begingroup$ It still only plots a blank...do you think something is up with the kernel maybe? $\endgroup$ Commented Aug 4, 2016 at 19:41
  • $\begingroup$ But thank you so much. I see where I made mistakes! $\endgroup$ Commented Aug 4, 2016 at 19:41
  • $\begingroup$ Yeah, try quitting the kernel and trying again. It works fine for me. $\endgroup$ Commented Aug 4, 2016 at 19:42
  • $\begingroup$ Cool! will do. So the function it is plotting is fine though? $\endgroup$ Commented Aug 4, 2016 at 19:43

1 Answer 1

2
$\begingroup$

You need to move the ReplaceAll into the 1st argument of Plot.

y[x_, α_, v_] := x*Tan[α] - 0.5*g*(x/(v*Cos[α]))^2
Manipulate[
  Plot[y[x, α, v] /. g -> 9.8, {x, 0, 10}],
  {α, 0, Pi/2},
  {v, 0.1, 10}]

plot

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.