Error using ==> run, File Error: Cannot write .txt file

5 ビュー (過去 30 日間)
Benjamin
Benjamin 2012 年 11 月 5 日
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-----------

回答 (1 件)

Jason Ross
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?

カテゴリ

Help Center および File ExchangeSearch Path についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by