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 247298

Submitted on 21 May 2013 by andrea84

Correct

50Size
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 = 10;
y_correct = false;
assert(isequal(your_fcn_name(x),y_correct))
allfactors =
     2     5    10
ans =
     0
2
Pass
 
%%
x = 28;
y_correct = true;
assert(isequal(your_fcn_name(x),y_correct))
allfactors =
     2     4     7    14    28
ans =
     1
3
Pass
 
%%
x = 8128;
y_correct = true;
assert(isequal(your_fcn_name(x),y_correct))
allfactors =
  Columns 1 through 8
           2           4           8          16          32          64         127         254
  Columns 9 through 13
         508        1016        2032        4064        8128
ans =
     1
4
Pass
 
%%
x = 564;
y_correct = false;
assert(isequal(your_fcn_name(x),y_correct))
allfactors =
     2     3     4     6    12    47    94   141   188   282   564
ans =
     0