[Eeglablist] help with saving eegdata as a mat file

zahra fotovatnia fotovatnia at yahoo.com
Thu Feb 7 22:20:45 PST 2019

hello all
I need to save the data I have in a set file as a ".mat" file. I am writing the following script but encounter this error. What changes should I make to the script?

for i=4               Root='E:\EEG_analysis_July2018\';                                   Drop='E:\Zahra\data analysis\Behnam_analysis\English targets\';                fileName=strcat(num2str(i),'.set'); %all the set files with C at the end ?????                saveFileName=strcat(Drop,strcat(num2str(i),'.mat'));                           % opening eeglab                 [ALLEEG EEG CURRENTSET ALLCOM] = eeglab;                    
                %loading the set file
                 [EEG] = pop_loadset( fileName, Root);                 [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, 0,'gui','off');                  EEG = eeg_checkset( EEG );                                  % Using eeglab data                tmpData = EEG.data;                save(tmpData, saveFileName);                         end   Error using saveMust be a string scalar or character vector.
Error in collect_eegdata (line 22)                save(tmpData, saveFileName);
Thank you very much for your help in advance.Zahra Fotovatnia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20190208/3f3dd21d/attachment.html>

More information about the eeglablist mailing list