Cody

Problem 940. R2012b atan in Degrees

Solution 2892446

Submitted on 30 Aug 2020
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   Fail
assert(isequal(atan_degrees(1,1),45))

Error using atand Too many input arguments. Error in atan_degrees (line 2) degrees=atand(y,x); Error in Test1 (line 1) assert(isequal(atan_degrees(1,1),45))

2   Fail
assert(isequal(atan_degrees(-1,1),135))

Error using atand Too many input arguments. Error in atan_degrees (line 2) degrees=atand(y,x); Error in Test2 (line 1) assert(isequal(atan_degrees(-1,1),135))

3   Fail
assert(isequal(atan_degrees(-1,-1),-135))

Error using atand Too many input arguments. Error in atan_degrees (line 2) degrees=atand(y,x); Error in Test3 (line 1) assert(isequal(atan_degrees(-1,-1),-135))

4   Fail
assert(isequal(atan_degrees(1,-1),-45))

Error using atand Too many input arguments. Error in atan_degrees (line 2) degrees=atand(y,x); Error in Test4 (line 1) assert(isequal(atan_degrees(1,-1),-45))

5   Fail
assert(isequal(atan_degrees(1,0),0))

Error using atand Too many input arguments. Error in atan_degrees (line 2) degrees=atand(y,x); Error in Test5 (line 1) assert(isequal(atan_degrees(1,0),0))

6   Fail
assert(isequal(atan_degrees(0,1),90))

Error using atand Too many input arguments. Error in atan_degrees (line 2) degrees=atand(y,x); Error in Test6 (line 1) assert(isequal(atan_degrees(0,1),90))

7   Fail
assert(isequal(atan_degrees(-1,0),180))

Error using atand Too many input arguments. Error in atan_degrees (line 2) degrees=atand(y,x); Error in Test7 (line 1) assert(isequal(atan_degrees(-1,0),180))

8   Fail
assert(isequal(atan_degrees(0,-1),-90))

Error using atand Too many input arguments. Error in atan_degrees (line 2) degrees=atand(y,x); Error in Test8 (line 1) assert(isequal(atan_degrees(0,-1),-90))

Suggested Problems

More from this Author241

Community Treasure Hunt

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

Start Hunting!