Info

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

using a function to input names of files

2 ビュー (過去 30 日間)
fima v
fima v 2017 年 2 月 19 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
i have a function that make operations on files that end with a-0 so i used dir command.
sad=dir('* a-0.txt');
i want it to return 4 arrays of the proccessed result, how to present the signature in that case ,i am not sure because its a special file name case. thanks.
  1 件のコメント
Walter Roberson
Walter Roberson 2017 年 2 月 19 日
Do your file names have a space before the a-0.txt ?

回答 (1 件)

Walter Roberson
Walter Roberson 2017 年 2 月 19 日
sad = dir('*a-0.txt');
sad_files = {sad.name};
nfile = length(sad_files);
for K = 1 : nfile
data{K} = readtable(sad_files{K});
end

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

Community Treasure Hunt

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

Start Hunting!

Translated by