how to give path of the input and output files in matlab?
17 次查看(过去 30 天)
显示 更早的评论
i have a M file in FOLDER_1...in that i coded to process some files in FOLDER_2 and i need to store the output files in FOLDER_3..i given the path in M file. .below is my code...i am stuck here..help needed my current folder(where my .m file is) is: 'C:\Users\FOLDER_1\
path_01 = 'C:\Users\FOLDER_2\';
path_02 = 'C:\Users\FOLDER_3\';
mkdir(path_01,'FOLDER_3');
Filelist = dir(fullfile(path_01, '*.ascii'));
for i = 1:length(Filelist)
filename_out = fullfile(path_02, [Filelist(i).name]);
RD=load(Filelist(i).name);
GO=load('Chlis.txt');
nrec=size(RD,1);
nchl=size(GO,1);
for i = 1:nrec,
for j = 1:nchl,
RD(i,j)=RD(i,j)*GO(j,2)+GO(j,3);
end
end
dlmwrite(filename_out,RD,'delimiter', '\t', ...
'precision', '%.6f');
getting error as:
??? Error using ==> load
Unable to read file datafile.ascii: No
such file or directory.
Error in ==> ascii at 8 RD=load(Filelist(i).name);
回答(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!