Cody

# Problem 392. Clock Hand Angle 1

Solution 2886533

Submitted on 28 Aug 2020 by Jens Kjærgaard Boldsen
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
assert(abs(handAngle('12:00:00')-0) < 1e-9)

a = 1.5708 b = 1.5708 c = 1.5708 theta = 1.2722e-14

2   Pass
assert(abs(handAngle('03:28:07')-64.6416666667) < 1e-9)

a = 6.0378 b = 4.9096 c = 0.8378 theta = 64.6417

3   Pass
assert(abs(handAngle('12:26:23')-145.1083333333) < 1e-9)

a = 1.3406 b = 5.0911 c = 5.4454 theta = 145.1083

4   Pass
assert(abs(handAngle('09:50:12')-6.1000000000) < 1e-9)

a = 2.7035 b = 2.5970 c = 0.3142 theta = 6.1000

5   Pass
assert(abs(handAngle('07:06:30')-174.2500000000) < 1e-9)

a = 4.1321 b = 0.8901 c = 4.7124 theta = 174.2500

6   Pass
assert(abs(handAngle('06:08:21')-134.0750000000) < 1e-9)

a = 4.6395 b = 0.6964 c = 5.6549 theta = 134.0750

7   Pass
assert(abs(handAngle('01:11:58')-35.8166666667) < 1e-9)

a = 0.9428 b = 0.3176 c = 1.7802 theta = 35.8167

8   Pass
assert(abs(handAngle('09:24:56')-132.8666666667) < 1e-9)

a = 2.9240 b = 5.2430 c = 1.9897 theta = 132.8667

9   Pass
assert(abs(handAngle('01:50:04')-114.6333333333) < 1e-9)

a = 0.6103 b = 2.6110 c = 1.1519 theta = 114.6333

10   Pass
assert(abs(handAngle('01:49:45')-116.3750000000) < 1e-9)

a = 0.6130 b = 2.6442 c = 3.1416 theta = 116.3750

11   Pass
assert(abs(handAngle('07:04:17')-173.5583333333) < 1e-9)

a = 4.1514 b = 1.1222 c = 6.0737 theta = 173.5583

12   Pass
assert(abs(handAngle('02:24:26')-74.3833333333) < 1e-9)

a = 0.3104 b = 5.2953 c = 5.1313 theta = 74.3833

13   Pass
assert(abs(handAngle('10:32:33')-120.9750000000) < 1e-9)

a = 2.3339 b = 4.4454 c = 4.3982 theta = 120.9750

14   Pass
assert(abs(handAngle('10:26:57')-151.7750000000) < 1e-9)

a = 2.3828 b = 5.0318 c = 1.8850 theta = 151.7750

15   Pass
assert(abs(handAngle('09:40:26')-47.6166666667) < 1e-9)

a = 2.7887 b = 3.6198 c = 5.1313 theta = 47.6167

16   Pass
assert(abs(handAngle('02:38:59')-154.4083333333) < 1e-9)

a = 0.1834 b = 3.7717 c = 1.6755 theta = 154.4083

17   Pass
assert(abs(handAngle('08:18:19')-139.2583333333) < 1e-9)

a = 3.5053 b = 5.9359 c = 5.8643 theta = 139.2583

18   Pass
assert(abs(handAngle('07:26:43')-63.0583333333) < 1e-9)

a = 3.9556 b = 5.0562 c = 3.3510 theta = 63.0583

19   Pass
assert(abs(handAngle('12:01:40')-9.1666666667) < 1e-9)

a = 1.5563 b = 1.3963 c = 3.6652 theta = 9.1667

20   Pass
assert(abs(handAngle('08:60:33')-93.0250000000) < 1e-9)

a = 3.1368 b = 1.5132 c = 4.3982 theta = 93.0250

21   Pass
assert(abs(handAngle('10:11:42')-124.3500000000) < 1e-9)

a = 2.5159 b = 0.3456 c = 3.4558 theta = 124.3500

### Community Treasure Hunt

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

Start Hunting!