Cody

Solution 1248614

Submitted on 9 Aug 2017 by Richard Blair
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
u = [0.5 0.5 0];; v = [1 0 0]; angle_in_degrees = vector2angle(u,v) assert(strcmp(num2str(angle_in_degrees),'45'))

dotPro = 0.5000 mag = 1 deg = 60 angle_in_degrees = 45 angle_in_degrees = 45

2   Pass
u = [0 0 1]; v = [1 0 0]; angle_in_degrees = vector2angle(u,v) assert(strcmp(num2str(angle_in_degrees),'90'))

dotPro = 0 mag = 1 deg = 90 angle_in_degrees = 90 angle_in_degrees = 90

3   Pass
u = [0 0.8 1]; v = [1 0.3 0]; angle_in_degrees = vector2angle(u,v) assert(strcmp(num2str(round(angle_in_degrees)),'80'))

dotPro = 0.2400 mag = 2.3400 deg = 80 angle_in_degrees = 80 angle_in_degrees = 80