Simple. You probably do not have write access to that directory. You cannot write a file to a directory where you are not allowed to write. Period. In some rare cases, you simply lack the room to write a file, but that would be RARE.
This is not a MATLAB issue, but your computer.
Either choose a directory where you do have write access, or change the permissions on that directory. Again, this is not in the control of MATLAB.