Question: Plotting ODE with constants

Hello, I'am using Maple 11 and have the following problem concerning plots of ODE: ode := M*(diff(x(t), t, t))+K*x(t) = Force; sol := dsolve({ode, x(0) = 0, (D(x))(0) = 0}, numeric); xx := (t) -> rhs(sol(t)[2]); dx := (t) -> rhs(sol(t)[3]); M := 1; K := 4*Pi^2; test := proc (F, t) global Force; Force := F; xx(t) end proc; When I call test(F,t) directly everything works fine: test(2, 2); -2.49946953367608378 10 ..... However, when I try to plot the test-function vs Force I get an error message: plot(test(pressure, 1), pressure = 1 .. 3); Error, (in sol) global 'Force' must be assigned to a numeric value before obtaining a solution But Force is assigned a numeric value in test... Link to Maple file: View 6864_SDOF_test.mw on MapleNet or Download 6864_SDOF_test.mw
View file details Thanks for any suggestions and help!! Martien
Please Wait...