Question: problem with slider for odeplot


After we solved two equations we want to plot them with two sliders. I am trying to have two sliders for k and mu. I followed what this link suggested:

But I get this warning:

Warning, `p1` is implicitly declared local to procedure `myplot`
This is Maple code:
> restart;
> with(plots);
> with(DEtools);
> eq1 := diff(x(t), t) = v(t); eq2 := diff(v(t), t) = -k*x(t)*(1-1/sqrt(x(t)^2+.25^2))-mu;
> inti[1] := x(0) = .12; inti[2] := v(0) = 10;
> sol := dsolve({eq1, eq2, inti[1], inti[2]}, {v(t), x(t)}, numeric, parameters = [k, mu]);
> myplot := proc () 
local k, mu; 
k := DocumentTools:-GetProperty('kSlider', 'value'); 
mu := DocumentTools:-GetProperty('muSlider', 'value'); 
p1 := odeplot(sol, [t, x(t)], t = 0 .. 25, colour = red); 
plots:-display([p1], scaling = constrained) 
end proc;

Is this because I am using odeplot to plot the solution?

Any suggestion?

Thank you

Please Wait...