Problem 1206. Angles of the hands of a clock
For this problem, consider an analog (or at least continuous digital representation) of a clock. Our clock is a 12 hour clock with an hour, minute, and second hand.
You'll receive a row vector that is [hours minutes seconds]. For this input time, determine the angles between the hands of the clock. All times for the clock will be times before 12:00:00, and all hour minute and second entries will correspond with real times. No error checking is required.
You need to provide a two element row vector that is, in degrees, [(angle between hour and minute hand) (angle between minute and second hand)].
While not terribly hard, the problem is a bit trickier than it will appear to many at first glance.
Solution Stats
Problem Comments
-
2 Comments
http://www.mathworks.com/matlabcentral/cody/problems/392-clock-hand-angle-1
Sorry, BM, I hadn't seen your problem before. I probably wouldn't have put mine in if I had. It's very similar. Well, I guess I know how to solve it now!
Solution Comments
Show commentsProblem Recent Solvers36
Suggested Problems
-
Sum all integers from 1 to 2^n
15464 Solvers
-
541 Solvers
-
Cell Counting: How Many Draws?
2015 Solvers
-
Who is the smartest MATLAB programmer?
753 Solvers
-
Switch matrix to a column vector
352 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!