Error using save Unable to write file generation: permission denied.

hello everyone after running my program, i can not save any of my variables. i do not understand why is wrong with my matlab, this does not often happen. generation.XTrainSet = TrainSET; generation.YTrainLabels = TrainLabels; generation.XTestSet = TestSET; generation.YTestLabels = TestLabels;
save generation_data generation
when i try saving this variable, this is the error i got:Error using save Unable to write file generation: permission denied. could anyone help me out, thanks

 采纳的回答

You lack write access in the current directory.
So either change the privileges in that directory, or you need to CD to a directory where you do have write access.
help cd
help pwd

5 个评论

thanks sir, it worked. i often run with "add to path", but this time i run with "change folder" and it worked.
Which folder you selected after change folder?
Dear sir, thank you for willing to help. I had already solved this problem.
Hi, do you know how to solve this probleme when the app is generate by Compiler and launched with MCR ?

请先登录,再进行评论。

更多回答(1 个)

you may opened in bin folder of matlab change to your local code folder

类别

帮助中心File Exchange 中查找有关 Share and Distribute Software 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!