dear vladimir, in read_eeglabdata.m, line 75: fid = fopen(header.orig.data); assumes that the files to be read in are located in the current matlab directory. one could change this into pathstr = fileparts(filename); % assuming the .dat and .set files are located in the same directory try fid = fopen([ pathstr filesep header.orig.data]); catch fid = fopen([ header.orig.filepath filesep header.orig.data ]); % which i personally find less intuitive, but more consistent with eeglab end to avoid this. On Fri, Jun 26, 2009 at 7:08 PM, Vladimir Litvak<[log in to unmask]> wrote: > Dear Jakob, > > Could you send me the error message and the problematic dataset? You > can use yousendit.com if it's too large. > > Best, > > Vladimir > > On Fri, Jun 19, 2009 at 3:08 PM, Jakob Scherer<[log in to unmask]> wrote: >> hi, >> >> it seems to me that in >> >> spm_cfg_eeg_convert.m, line 37 should read: >> usetrials.val = {1}; % instead of usetrials.val = {0}, >> >> to match the default value defined in spm_eeg_convert.m >> (from the help text: >> % S.usetrials - 1 - take the trials as defined in the data [default] >> % 0 - use trial definition file even though the data is >> % already epoched) >> >> >> Then, having corrected that, i get the following error: >> >> SPM8: spm_eeg_channelselection (v2866) 15:22:55 - 19/06/2009 >> ======================================================================== >> Failed 'M/EEG Conversion' >> Invalid MEX-file >> 'P:\Science\Matlab\spm8\@file_array\private\mat2file.mexw64': Invalid >> access to memory location. >> >> . >> In file "P:\Science\Matlab\spm8\@file_array\subsasgn.m" (v1355), >> function "subfun" at line 132. >> In file "P:\Science\Matlab\spm8\@file_array\subsasgn.m" (v1355), >> function "subsasgn" at line 73. >> In file "P:\Science\Matlab\spm8\spm_eeg_convert.m" (v3088), function >> "spm_eeg_convert" at line 346. >> In file "P:\Science\Matlab\spm8\config\spm_cfg_eeg_convert.m" (v3059), >> function "eeg_convert" at line 231. >> >> The following modules did not run: >> Failed: M/EEG Conversion >> >> >> Thanks for any help, >> regards, jakob >> >