フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

is this a problem with the file?

1 回表示 (過去 30 日間)
suganya s
suganya s 2015 年 8 月 21 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
here the screen shot,tell me what is problem?

回答 (1 件)

Walter Roberson
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

この質問は閉じられています。

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by