首页 > 代码库 > 【matlab】Error using save Unable to write file pqfile.mat: permission denied.解决

【matlab】Error using save Unable to write file pqfile.mat: permission denied.解决

save(‘pqfile.mat‘,‘M‘);

这里M是个矩阵

报错:

Error using save
Unable to write file pqfile.mat: permission denied.

 

解决

https://cn.mathworks.com/matlabcentral/answers/85736-how-to-save-to-mat-file

原来是没有权限写当前目录,换个位置就好了

 

 save(‘E:\我的坚果云\pqfile.mat‘,‘M‘);

【matlab】Error using save Unable to write file pqfile.mat: permission denied.解决