Inverted pendulum simulation using matlab/simulink
Loading...
5,437
Loading...
Uploader Comments (atotoole21)
see all
All Comments (5)
-
could you share with your model in simulink ?
the animation is very fast:)
Loading...
I've been trying to find tutorials on the internet on how to draw squares and rectangles, but the only thing i've seen was how to draw circles. could you please tell me what commands you are using?
x89codered89x 4 months ago
Apparently I can't post a link on youtube, so just google "Create one or more filled polygons Matlab" and the documentation for Matlab's patch command should be the first link.
atotoole21 4 months ago
ok so what did you use in order to create animations with simulink?
x89codered89x 4 months ago
@x89codered89x The only thing simulink is doing is the calculations, its outputs cart position, and pendulum angle to matlab, and I do the animations in matlab. The animation is pretty simple. I just use matlab's "patch" command that is used to draw polygons. For the animation I :
- Get the values from simulink
- Draw the pendulum and the cart
- Get the next values from simulink
- Delete the last drawing
- Draw the new pendulum and cart.
atotoole21 4 months ago