When trying to implement the bouncing ball using differential equations and continous simulation, as described on mathworks.com, I seem to encounter an error.
If I use transition condition falling(p), as shown on mathworks.com, an error is raised:
Error:The data p was read before being written to. This error will stop the simulation.
Transition in Chart 'simple_ball_ode/Falling':
[falling(p)]
If I use a condition p<=0 instead, the error is gone and simulation runs properly.
Please see the images for clarification. I would really appreciate some help, cause I am clueless at this point.