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 43198

Submitted on 16 Feb 2012 by S L

Correct

267Size
Leading solution size is 8.
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
 
fname = 'omphaloskeptic.m';
fid = fopen(fname);
file = textscan(fid,'%c', ...
  'CommentStyle','%', ...
  'Whitespace','');
fclose(fid);
ha = histc(file{1},1:128);
hp = omphaloskeptic;
assert(~any(ismember(33:41,find(ha))),'Used an illegal character');
assert(isequal(ha,hp),'Actual characters did not match prediction');