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 133592

Submitted on 2 Sep 2012

Incorrect

33Size
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
Pass
 
%%
x = 1;
tf_correct = true;
assert(isequal(woodall(x),tf_correct))

                    
2
Pass
 
%%
x = 2;
tf_correct = false;
assert(isequal(woodall(x),tf_correct))

                    
3
Pass
 
%%
x = 3;
tf_correct = false;
assert(isequal(woodall(x),tf_correct))

                    
4
Pass
 
%%
x = 7;
tf_correct = true;
assert(isequal(woodall(x),tf_correct))

                    
5
Pass
 
%%
x = 23;
tf_correct = true;
assert(isequal(woodall(x),tf_correct))

                    
6
Pass
 
%%
x = 63;
tf_correct = true;
assert(isequal(woodall(x),tf_correct))

                    
7
Pass
 
%%
x = 159;
tf_correct = true;
assert(isequal(woodall(x),tf_correct))

                    
8
Pass
 
%%
x = 383;
tf_correct = true;
assert(isequal(woodall(x),tf_correct))

                    
9
Pass
 
%%
x = 895;
tf_correct = true;
assert(isequal(woodall(x),tf_correct))

                    
10
Pass
 
%%
x = 1000;
tf_correct = false;
assert(isequal(woodall(x),tf_correct))

                    
11
Pass
 
%%
x = 2000;
tf_correct = false;
assert(isequal(woodall(x),tf_correct))

                    
12
Pass
 
%%
x = 2047;
tf_correct = true;
assert(isequal(woodall(x),tf_correct))

                    
13
Pass
 
%%
x = 3000;
tf_correct = false;
assert(isequal(woodall(x),tf_correct))

                    
14
Fail
 
%%
x = 3001;
tf_correct = false;
assert(isequal(woodall(x),tf_correct))
Error: Attempted to access y(3001); index out of bounds because numel(y)=3000.
15
Fail
 
%%
x = 4607;
tf_correct = true;
assert(isequal(woodall(x),tf_correct))
Error: Attempted to access y(4607); index out of bounds because numel(y)=3000.
16
Fail
 
%%
x = 10239;
tf_correct = true;
assert(isequal(woodall(x),tf_correct))
Error: Attempted to access y(10239); index out of bounds because numel(y)=3000.
17
Fail
 
%%
x = 22527;
tf_correct = true;
assert(isequal(woodall(x),tf_correct))
Error: Attempted to access y(22527); index out of bounds because numel(y)=3000.
18
Fail
 
%%
x = 7516192767;
tf_correct = true;
assert(isequal(woodall(x),tf_correct))
Error: Attempted to access y(-1.07374e+09); index must be a positive integer or logical.
19
Fail
 
%%
x = 7516192766;
tf_correct = false;
assert(isequal(woodall(x),tf_correct))
Error: Attempted to access y(-1.07374e+09); index must be a positive integer or logical.