Info
此问题已关闭。 请重新打开它进行编辑或回答。
is this a problem with the file?
1 次查看(过去 30 天)
显示 更早的评论
here the screen shot,tell me what is problem?
0 个评论
回答(1 个)
Walter Roberson
2015-8-21
You used dir() against a directory and then tried to open a file name you saw in the directory without including the directory in the file name to open.
You should use a code structure similar to:
projectdir = 'E:\scorpioncensus\reports';
dinfo = dir( fullfile(projectdir, '*.txt') );
for K = 1 : length(dinfo)
thisfile = fullfile(projectdir, dinfo(K).name);
fid = fopen(thisfile, 'rt');
data = textscan(fid, '%f%f%f');
fclose(fid);
... do something with the data
end
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!