Cody

Solution 1909527

Submitted on 22 Aug 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
x = 1; assert(isequal(are_variables(x),1))

ans = 'double'

Output argument "y" (and maybe others) not assigned during call to "are_variables". Error in Test1 (line 2) assert(isequal(are_variables(x),1))

2   Fail
x = 1; assert(isequal(are_variables(1),0))

ans = 'double'

Output argument "y" (and maybe others) not assigned during call to "are_variables". Error in Test2 (line 2) assert(isequal(are_variables(1),0))

3   Fail
x = 1; assert(isequal(are_variables('x'),0))

ans = 'char'

Output argument "y" (and maybe others) not assigned during call to "are_variables". Error in Test3 (line 2) assert(isequal(are_variables('x'),0))

4   Fail
assert(isequal(are_variables('x',1,2),0))

Error using are_variables Too many input arguments. Error in Test4 (line 1) assert(isequal(are_variables('x',1,2),0))

5   Fail
a = 1; b=0; assert(isequal(are_variables(a,b),1))

Error using are_variables Too many input arguments. Error in Test5 (line 3) assert(isequal(are_variables(a,b),1))

6   Fail
assert(isequal(are_variables(1,2,3,4,5),0))

Error using are_variables Too many input arguments. Error in Test6 (line 1) assert(isequal(are_variables(1,2,3,4,5),0))

7   Fail
a = 1; assert(isequal(are_variables(a,a,a),1))

Error using are_variables Too many input arguments. Error in Test7 (line 2) assert(isequal(are_variables(a,a,a),1))

8   Fail
a = 1; b=0; c=ones(5); assert(isequal(are_variables(a,'a'),0))

Error using are_variables Too many input arguments. Error in Test8 (line 4) assert(isequal(are_variables(a,'a'),0))

9   Fail
x = 1; y=0; zz=ones(5); assert(isequal(are_variables(zz,'a'),0))

Error using are_variables Too many input arguments. Error in Test9 (line 4) assert(isequal(are_variables(zz,'a'),0))

10   Fail
x = 1; y=0; z=ones(5); assert(isequal(are_variables(x,y,z),1))

Error using are_variables Too many input arguments. Error in Test10 (line 4) assert(isequal(are_variables(x,y,z),1))