Hi Yen,
As per my understanding, you wish to visualize the plot that you have created above.
You may plot the graph inside a `for` loop, one value at a time. `pause` function can be used to delay the frames, so the visualization looks like an animation. `cla` command can also be used inside the loop to clear the current axes.
I have made some modifications to your code, to serve your purpose and saved it in a file named `continuumRobotSimulation.m` and attached it with this post.
Please review the code and see if it solves your problem.
References:
pause function: https://in.mathworks.com/help/matlab/ref/pause.html
cla command: https://in.mathworks.com/help/matlab/ref/cla.html