Which folder path is your MATLAB's current directory?
You can check by the following command.
And pleaes check your user account has permission to write a file in it.
You can change the current folder by the following examples. After changing a folder properly, I suppose you have a write permission.