I want to make a simulation of the hands of a clock

3 views (last 30 days)
I would like to make 3 diferent lines (hands of the clock: minutes, seconds and hours) that rotates in clockwise, but I'm having troubles, the coordinates of my center are moving and I can't add the 3 vectors together,
  1 Comment
Adam Danz
Adam Danz on 30 Jun 2022
I suggest using polar axes.
Here's an example from the 2021 Mini Hack competition however the code is very sloppy due to the character limitation imposed by the competition so you should definitely clean it up. Also, use polarplot rather than plot.
Then you'll need to set up a timer object to change the position of the arms every second.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!