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 351162

Submitted on 13 Nov 2013 by Peter Wittenberg

Correct

18Size
Leading solution size is 10.
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
 
%%
p = 233;
y_correct = true;
assert(isequal(your_fcn_name(p),y_correct))

                    
2
Pass
 
%%
p = 23;
y_correct14 = true;
assert(isequal(your_fcn_name(p),y_correct14))

                    
3
Pass
 
%%
p = 22;
y_correct14 = false;
assert(isequal(your_fcn_name(p),y_correct14))

                    
4
Pass
 
%%
p = 1 % p must also be a prime number !!
y_correct1t = false;
assert(isequal(your_fcn_name(p),y_correct1t))
p =
     1
5
Pass
 
%%
p = 14 % p must also be a prime number !!
correct1t = false;
assert(isequal(your_fcn_name(p),correct1t))
p =
    14
6
Pass
 
%%
p = 29
correct1tp = true;
assert(isequal(your_fcn_name(p),correct1tp))
p =
    29