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 372876

Submitted on 20 Dec 2013 by J-G van der Toorn

Correct

22Size
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
 
%%
x = 1;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
2
Pass
 
%%
x = 9;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
3
Pass
 
%%
x = 10;
y_correct = false;
assert(isequal(isnarcissistic(x),y_correct))

                    
4
Pass
 
%%
x = 99;
y_correct = false;
assert(isequal(isnarcissistic(x),y_correct))

                    
5
Pass
 
%%
x = 152;
y_correct = false;
assert(isequal(isnarcissistic(x),y_correct))

                    
6
Pass
 
%%
x = 153;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
7
Pass
 
%%
x = 154;
y_correct = false;
assert(isequal(isnarcissistic(x),y_correct))

                    
8
Pass
 
%%
x = 371;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
9
Pass
 
%%
x = 370;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
10
Pass
 
%%
x = 1634;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
11
Pass
 
%%
x = 8207;
y_correct = false;
assert(isequal(isnarcissistic(x),y_correct))

                    
12
Pass
 
%%
x = 9474;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
13
Pass
 
%%
x = 9926315;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
14
Pass
 
%%
x = 88593477;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
15
Pass
 
%%
x = 9800817;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
16
Pass
 
%%
x = 54748;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
17
Pass
 
%%
x = 4679307774;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
18
Pass
 
%%
x = 472335975;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
19
Pass
 
%%
x = 32164049650;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
20
Pass
 
%%
x = 32164049651;
y_correct = true;
assert(isequal(isnarcissistic(x),y_correct))

                    
21
Pass
 
%%
x = 32164049652;
y_correct = false;
assert(isequal(isnarcissistic(x),y_correct))