The error message means, that you try to create a folder inside a path, in which you do not have write access. The solution is easy: Choose the correct parent folder for mkdir, e.g.
or any otehr location. With just
the current folder is used, and this might not be what you expect it to do. Most of all it can differ from the startup folders, which is active, when you start the Matlab GUI.