The most common reason for this type of problem is some sort of setup where the MATLAB session is uable to perform any system commands.
The workaround for the situation is to create a 'startup.m' file with the following code:
setenv('MATLAB_SHELL','/bin/tcsh')
You can also look at a problem that is quite similar to yours and try a similar solution.
I Hope this was helpful.