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'))
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In vector2angle (line 1)
In ScoringEngineTestPoint1 (line 3)
In solutionTest (line 3)]
angle_in_degrees =
0
|
2 | Pass |
u = [0 0 1];
v = [1 0 0];
angle_in_degrees = vector2angle(u,v)
assert(strcmp(num2str(angle_in_degrees),'90'))
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In vector2angle (line 1)
In ScoringEngineTestPoint2 (line 3)
In solutionTest (line 5)]
angle_in_degrees =
0
|
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'))
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In vector2angle (line 1)
In ScoringEngineTestPoint3 (line 3)
In solutionTest (line 7)]
angle_in_degrees =
0
|
Generate a vector like 1,2,2,3,3,3,4,4,4,4
1571 Solvers
138 Solvers
The Answer to Life, the Universe, and Everything
313 Solvers
312 Solvers
07 - Common functions and indexing 1
269 Solvers