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 107504

Submitted on 6 Jul 2012

Incorrect

22Size
Leading solution size is 13.
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
Fail
 
%%
fn='interp1.m';
y=Cody_size(fn);
y_expected=2218;
assert(isequal(y,y_expected))
Error: Undefined function or variable 'filename'.
2
Fail
 
%%
fn='Cody_size.m';
y=Cody_size(fn);
t = mtree(fn,'-file');
y_expected = length(t.nodesize);
assert(isequal(y,y_expected))
Error: Undefined function or variable 'filename'.
3
Fail
 
%%
fn='polyarea.m';
y=Cody_size(fn);
y_expected=196;
assert(isequal(y,y_expected))
Error: Undefined function or variable 'filename'.