Error using ==> run, File Error: Cannot write .txt file
5 次查看(过去 30 天)
显示 更早的评论
Hi,
I am suppose to run this command run 'batch'. However, upon running the 'batch' command, I kept receiving this error: ??? Error using ==> run, File error:Cannot write filename.txt. Line (9) is giving me the error, but I am not able to access the function, as this was created using creategenso.dll file. I have checked my working directory and it seems pretty file, except I cannot confirm if I have the necessary rights to write the output .txt file to output folder directory (i have checked my window folder rights, and everything seem fine). May I ask if there is any way to check my current write/read rights in matlab?
I am current using matlab 7 Release 14 - Year 2004
---------------------Actual Message ------------
Creating base structure...done
??? Error using ==> run
File error: Cannot write Error_Per_Epoch.txt
--------------End of Actual Message ------------
-----------Line of code causing Error-----------
(1)t_file = '\SpiralTrain(194).txt'
(2)t_train_path = [pwd t_file];
(3)train_set = loadfile(t_train_path);
(4)t_file = '\SpiralTest1(194).txt'
(5)t_test_path = [pwd t_file];
(6)test_set = loadfile(t_test_path);
(7)Config;
(8)train_config.file_name = t_train_path;
(9)[Model.net] = creategenso(train_config,train_set(:,1:end-1),train_set(:,end),'mftype','gaus','submf','all');
-----End of Line of code causing Error-----------
0 个评论
回答(1 个)
Jason Ross
2012-11-5
编辑:Jason Ross
2012-11-5
The easiest way to confirm you can write in a directory is to create a file there. Do this in Windows Explorer or MATLAB (or both!) to ensure the directory is open.
When you say "batch", are you referring to a DOS batch file, a MATLAB command, a function you (or someone else) wrote, or something else?
Also, what version of Windows are you running on, and is the folder in some place the operating system might consider "off limits for users", like C:\Windows or C:\Program Files?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Search Path 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!