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 252545

Submitted on 1 Jun 2013 by Yaroslav

Correct

28Size
Leading solution size is 15.
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
 
%%
y=2020;
n=bondcount(y);
assert(isequal(round(n),27))

                    
2
Pass
 
%%
y=2100;
n=bondcount(y);
assert(isequal(round(n),52))

                    
3
Pass
 
%%
y=2289;
n=bondcount(y);
assert(isequal(round(n),100))

                    
4
Pass
 
%%
y=4661;
n=bondcount(y);
assert(isequal(round(n),500))