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 210873

Submitted on 1 Mar 2013

Incorrect

23Size
Leading solution size is 11.
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
Fail
 
%%
X = [-1 1 0];
Y=[-1 1 0];
y_correct = 1;
assert(isequal(your_fcn_name(X,Y),y_correct))
Error: Output argument "y" (and maybe others) not assigned during call to "/users/msssystem11/your_fcn_name.m>your_fcn_name".
2
Fail
 
%%
X = [0 3 6];
Y=[5 7 9];
y_correct = 1;
assert(isequal(your_fcn_name(X,Y),y_correct))
Error: Output argument "y" (and maybe others) not assigned during call to "/users/msssystem11/your_fcn_name.m>your_fcn_name".
3
Fail
 
%%
X = [0 7 14];
Y=[-7 -5 -3];
y_correct = 1;
assert(isequal(your_fcn_name(X,Y),y_correct))
Error: Output argument "y" (and maybe others) not assigned during call to "/users/msssystem11/your_fcn_name.m>your_fcn_name".
4
Fail
 
%%
X = [10 12 -10];
Y=[-7 -3 47];
y_correct = 0;
assert(isequal(your_fcn_name(X,Y),y_correct))
Error: Output argument "y" (and maybe others) not assigned during call to "/users/msssystem11/your_fcn_name.m>your_fcn_name".
5
Fail
 
%%
X = [0 0.8 1];
Y=[0.2 1 1];
y_correct = 0;
assert(isequal(your_fcn_name(X,Y),y_correct))
Error: Output argument "y" (and maybe others) not assigned during call to "/users/msssystem11/your_fcn_name.m>your_fcn_name".