Cody

# Problem 940. R2012b atan in Degrees

Solution 1980628

Submitted on 17 Oct 2019
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 atan2d Not enough input arguments. Error in atan_degrees (line 2) degrees=atan2d(x/y) Error in Test1 (line 1) assert(isequal(atan_degrees(1,1),45))

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

Error using atan2d Not enough input arguments. Error in atan_degrees (line 2) degrees=atan2d(x/y) Error in Test2 (line 1) assert(isequal(atan_degrees(-1,1),135))

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

Error using atan2d Not enough input arguments. Error in atan_degrees (line 2) degrees=atan2d(x/y) Error in Test3 (line 1) assert(isequal(atan_degrees(-1,-1),-135))

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

Error using atan2d Not enough input arguments. Error in atan_degrees (line 2) degrees=atan2d(x/y) Error in Test4 (line 1) assert(isequal(atan_degrees(1,-1),-45))

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

Error using atan2d Not enough input arguments. Error in atan_degrees (line 2) degrees=atan2d(x/y) Error in Test5 (line 1) assert(isequal(atan_degrees(1,0),0))

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

Error using atan2d Not enough input arguments. Error in atan_degrees (line 2) degrees=atan2d(x/y) Error in Test6 (line 1) assert(isequal(atan_degrees(0,1),90))

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

Error using atan2d Not enough input arguments. Error in atan_degrees (line 2) degrees=atan2d(x/y) Error in Test7 (line 1) assert(isequal(atan_degrees(-1,0),180))

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

Error using atan2d Not enough input arguments. Error in atan_degrees (line 2) degrees=atan2d(x/y) Error in Test8 (line 1) assert(isequal(atan_degrees(0,-1),-90))

### Community Treasure Hunt

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

Start Hunting!