フォルダー内のすべての .xls ファイルをループし、特定のセルからデータを取得する必要があるスクリプトを作成しています。これは可能だと思いますxlsread
が、次のようなエラーが表示され続けます。
Matlab:xlsread:filenotfound
コードの基本構造は次のとおりです。
files = dir('C:\folder\folder\folder\*.xls');
channelinfo = 'C:\differentfolder\chanloc.type';
cnt = '.cnt';
condition = 'varriable';
for i = 1:length(files(:,1))
try
CNTCrash1WindowStart = xlsread(files(i).name, 'Summary', 'C8');
CNTCrashWindowEnd = xlsread(files(i).name, 'Summary', 'D8');
subjectNum = xlsread(files(i).name, 'User Info', 'A2');
eeglab;
%eeglab things happen here
catch ME
disp(ME)
end
end