Simulate an analog clock as partly demonstrated in class


Question 1. For this assignment, write a MATLAB program called clock_animaton.m. Upon execution the program is to simulate an analog clock as partly demonstrated in class for the case of the second hand (I say partially because I made use of 100 locations tick marks in my example while a true clock has only 60 distinct locations along the perimeter of the clock).

The clock should have a second, minute and hour hand of different colors and of different length (second hand bigger than minute hand and minute hand bigger than the one depicting the hour).

The simulation doesn't have to keep track of actual time but it ought to display/animate the coordinated mechanism of an analog clock. Moreover, I would like you to place markings (using text()) that indicate 3, 6, 9 and 12 o'clock positions at the appropriate locations along the perimeter of the drawn circle.

Your simulation must run properly (show proper mechanism of a clock) for at least a couple of hours if not indefinitely (you may make use of a while loop if you opt for the second option ... do help on it to get insight on how to make use of it).

Question 2. This portion of the assignment in a natural extension of part (1).

Create a program called plot time.m. Here instead of animating the mechanism, you are to prompt the user for "a time" using input().

Once the user has supplied the second, minute and hour values, you are to provide a plot of an analog clock that shows the specified time by the user.

Request for Solution File

Ask an Expert for Answer!!
MATLAB Programming: Simulate an analog clock as partly demonstrated in class
Reference No:- TGS02686549

Expected delivery within 24 Hours