function mkdirquiet(x) <x> refers to a directory location make the directory, suppressing warnings (e.g. that the directory already exists). assert that the result was successful. example: mkdirquiet('temp');
0001 function mkdirquiet(x) 0002 0003 % function mkdirquiet(x) 0004 % 0005 % <x> refers to a directory location 0006 % 0007 % make the directory, suppressing warnings 0008 % (e.g. that the directory already exists). 0009 % assert that the result was successful. 0010 % 0011 % example: 0012 % mkdirquiet('temp'); 0013 0014 prev = warning('query'); warning('off'); 0015 success = mkdir(x); 0016 warning(prev); 0017 assert(success,sprintf('mkdir of %s failed',x));