Cody

# Problem 3031. Expression or variable?

Solution 816927

Submitted on 30 Jan 2016
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))

Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string.

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

Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string.

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

Not enough input arguments.

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

Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string.

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

Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string.

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

Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string.

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

Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string.

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

Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string.

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

Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string.

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

Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string.