MATLAB: Is permission denied to save workspace variables

function save

I want to save my workspace variables with function "save something.mat" and it says: Error using save Unable to write file something.mat: permission denied. Why it happens? How can I change it? Thank you very much.

Best Answer

Perhaps you don't have write permissions in the directory where you try to save the results. In that case it might be for a good or bad reason - I typically have disabled write permissions in my directories where I save my raw-data (In my case for good reason based in self-preservation), so I read data from there and save my results in some adjacent work/analysis/results-directory.
HTH
Related Question