Each time i run my simulation i get the error attached below. Please help

1 次查看(过去 30 天)
Please see the attached image.

采纳的回答

OCDER
OCDER 2018-9-13
Are you using cd, change directory, anywhere in your code to go to that Program File folder? What is your current working directory, when you type cd ?
Change your current working directory to one where you have permission to create files.
WorkDir = 'c:\Users\user_name\Desktop\MyFolder'; %Your working directory
if ~exist(WorkDir, 'dir')
mkdir(WorkDir) %Make sure you do have a directory
end
cd(WorkDir)
run your code now
The better solution is to find the code where you are trying to write files, and make sure to use the FULL FILE PATH, and not relative file path.
For instance,
plot(1:10, 1:10)
[FileName, FilePath] = uiputfile('*.png');
saveas(gcf, FileName) %will save to current working dir
saveas(gcf, fullfile(FilePath, FileName)) %will save to an exact location

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by