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

Solution 218446

Submitted on 18 Mar 2013 by Jean-Marie SAINTHILLIER

Correct

88Size
Leading solution size is 40.
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
 
%%
dx1=[-4, 2, 3];
dy1=[-1,-1,0];
dx2=[2, 0,-2,-2];
dy2=[-1,-2,-1, 0];
assert(isequal(yaff(dx1,dy1,dx2,dy2),false))

                    
2
Pass
 
%%
dx1=[-4, 2, 3];
dy1=[-1,-1,-1];
dx2=[2, 0,-2,-2];
dy2=[-1,-2,-1, 0];
assert(isequal(yaff(dx1,dy1,dx2,dy2),true))

                    
3
Pass
 
%%
dx1=[6,-4, 5, 2];
dy1=[1, 0, 1,-1];
dx2=[2, 2, 3,-3, 1, 0, 6];
dy2=[-5, 2,-2,-3, 4, 3, 3];
assert(isequal(yaff(dx1,dy1,dx2,dy2),true))

                    
4
Pass
 
%%
dx1=[6,-3, 5, 1];
dy1=[1, 0, 1,-1];
dx2=[2, 2, 3,-3, 1, 0, 6];
dy2=[-5, 2,-2,-3, 4, 3, 3];
assert(isequal(yaff(dx1,dy1,dx2,dy2),false))