I want to preprocess the EEG data with EEGLAB, when I use the pop_saveset to save the process dataset, but it report an error about “pop_saveset error: argument ‘filepath’ must be a string”。 However, the class of filepath is string, how to save this problem?
base = "E:\datasets\Simultaneous_EEG_NIRS\eeg";
EEG.filepath = strcat(base, subfolders(i).name, '\');
fprintf(EEG.filepath)
EEG = pop_runica(EEG, 'icatype', 'runica', 'extended',1,'rndreset','yes','pca',28,'interrupt','on');
EEG = pop_saveset(EEG, 'filname', strcat(files(j).name(1:end-4), "_ICA.set"), 'filepath', EEG.filepath);
The printed information is
>> fprintf(class(EEG.filepath))
string>>
>> fprintf(EEG.filepath)
E:datasetsSimultaneous_EEG_NIRSeegVP001>>
solve the above question
New contributor
user24683144 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.