what changes can I make so that all files are selected automatically
4 ビュー (過去 30 日間)
古いコメントを表示
[files,path] = uigetfile({'.txt'},'MultiSelect', 'on');
if iscell(files)
for n = 1:length(files)
data = importdata(fullfile(path,files{n})); % fullfile including path
% save data
end
else
data = importdata(fullfile(path,files));
% save data
end
0 件のコメント
回答 (1 件)
Cris LaPierre
2021 年 10 月 18 日
2 件のコメント
Cris LaPierre
2021 年 10 月 18 日
You would use uigetdir to get the path to the folder. If you do not need the path to be dynamic, you can hardcode it without using uigetdir.
Make an attempt and, if you can't get it working, share the code you wrote along with any error messages you are getting (all the red text).
参考
カテゴリ
Help Center および File Exchange で Low-Level File I/O についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!