Cody

Solution 216051

Submitted on 11 Mar 2013
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
%% count files subdirectories files = subdir(fullfile(matlabroot,'java')); assert(numel(files)>=595 & isfield(files,'name'))

Error: Assertion failed.

2   Fail
%% count text files files = subdir(fullfile(matlabroot,'*.txt')); [~,~,ext]=cellfun(@fileparts,{files.name},'UniformOutput',false); assert(numel(files)>=209 & isfield(files,'name') & all(strcmp(ext,'.txt')))

Error: Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N) to change the limit. Be aware that exceeding your available stack space can crash MATLAB and/or your computer.

3   Fail
%% files = subdir(fullfile(matlabroot,'toolbox','*.m')); [~,~,ext] = cellfun(@fileparts,{files.name},'UniformOutput',false); assert(numel(files)>=15060 & isfield(files,'name') & all(strcmp(ext,'.m')))

Error: Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N) to change the limit. Be aware that exceeding your available stack space can crash MATLAB and/or your computer.