Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Solution 155093

Submitted on 29 Oct 2012 by Jean-Marie SAINTHILLIER

Correct

12Size
Leading solution size is 12.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
assert(isequal(atan_degrees(1,1),45))

	    	
2
Pass
 
%%
assert(isequal(atan_degrees(-1,1),135))

	    	
3
Pass
 
%%
assert(isequal(atan_degrees(-1,-1),-135))

	    	
4
Pass
 
%%
assert(isequal(atan_degrees(1,-1),-45))

	    	
5
Pass
 
%%
assert(isequal(atan_degrees(1,0),0))

	    	
6
Pass
 
%%
assert(isequal(atan_degrees(0,1),90))

	    	
7
Pass
 
%%
assert(isequal(atan_degrees(-1,0),180))

	    	
8
Pass
 
%%
assert(isequal(atan_degrees(0,-1),-90))