<html><head></head><body><div>hello all</div><div><br></div><div>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?</div><div><br></div><div><div><br></div><div>for i=4</div><div> Root='E:\EEG_analysis_July2018\'; </div><div> Drop='E:\Zahra\data analysis\Behnam_analysis\English targets\';</div><div> fileName=strcat(num2str(i),<b>'.set')</b>; %all the set files with C at the end ?????</div><div> saveFileName=strcat(Drop,strcat(num2str(i),'.mat'));</div><div> </div><div> % opening eeglab</div><div> [ALLEEG EEG CURRENTSET ALLCOM] = eeglab;</div><div> <br></div><div> %loading the set file<br></div><div> [EEG] = pop_loadset( fileName, Root);</div><div> [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, 0,'gui','off'); </div><div> EEG = eeg_checkset( EEG ); </div><div> </div><div> % Using eeglab data</div><div> tmpData = EEG.data;</div><div> save(tmpData, saveFileName);</div><div> </div><div> end</div><div> <span><div>Error using save</div><div>Must be a string scalar or character vector.</div><div><br></div><div>Error in collect_eegdata (line 22)</div><div> save(tmpData, saveFileName);</div></span></div><br></div><div>Thank you very much for your help in advance.</div><div>Zahra Fotovatnia</div><div class="ydp5273441yahoo-style-wrap" style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 13px;"></div></body></html>