eeglab2fieldtrip

Valesca Kooijman Kooijman at TIFN.NL
Fri Jul 13 11:02:44 CEST 2007


Hi Robert,

In connection with your previous advice concerning the eeglab2fieldtrip 
script, we came accross the following problem and solution (see script 
below):

filename   = 'fk dag 5-Deci.set';
load(filename, '-mat');
%the next line was included because the eeglab2fieldtrip script says 
% %data.trial{index}  = fixprecision(EEG.data(:,:,index));
% while the variable EEG.data only contains the name of the variable and 
not the data
% the next line assigns the data to EEG.data
EEG.data   = EEGDATA; 
%%%%%%
data       = eeglab2fieldtrip(EEG,'preprocessing');
hdr.nChans = length(data.label);
hdr.label  = data.label;
hdr.Fs     = data.fsample;
write_fcdc_data(filename, EEG.data, 'header', hdr, 'dataformat', 
'brainvision_eeg');

I do still get the following warning after running the above script:

Warning: writing segmented data as if it were continuous
In fieldtrip-20070710\private\write_brainvision_eeg at 38
In fieldtrip-20070710\private\write_data at 63
In write_fcdc_data at 48
In ConversionEEGDATA at 13

Is this problematic or is this a standard warning following conversion to 
Vision Analyzer?
In addition, I was wondering where my trial onset markers are written to? 
Write_fcdc_data only generates a .eeg and a .hdr file, and not a .vmrk 
file. 

>>From your earlier emails I understood that the datamatrix should be 
converted to ntrials X nchans X nsamples before running write­_fcdc_data.  
Currently my datamatrix consists of nchans X nsamples X ntrials.  Would 
you mind letting me know how I can convert my datamatrix? Thanks a lot.

Best,
Valesca





Robert Oostenveld <r.oostenveld at FCDONDERS.RU.NL> 
Sent by: FieldTrip discussion list <FIELDTRIP at NIC.SURFNET.NL>
07/07/2007 02:09 PM
Please respond to
FieldTrip discussion list <FIELDTRIP at NIC.SURFNET.NL>


To
FIELDTRIP at NIC.SURFNET.NL
cc

Subject
Re: [FIELDTRIP] eeglab2fieldtrip






On 6 Jul 2007, at 8:27, Valesca Kooijman wrote:
> The latest version of eeglab2fieldtrip gives me the same error 
> message in line 146 (where it calls the fixprecission function, 
> instead of in line 149).
> Is there another solution? If not, which version of matlab do you 
> recommend?

Matlab 7.0.1 is an old version, released around end 2004. It was 
quickly superseeded with version 7.0.4 to fix some serious bugs. I 
reccommend people in general to work with the latest matlab versionm, 
which now is 7.4.

You can fix your problem by changing the "matlabversion" function 
which is included as subfunction inside the eeglab2fieldtrip 
function. Go to line 250 and replace the code there with the snippet 
below. I will make the same change in the release version.

Robert
----

function [v] = matlabversion;
s = ver('matlab');
v = s.Version;
if ischar(v)
   % try converting to a number
   n = str2num(v);
   if isempty(n)
     switch v
     case '6.5.1'
       n = 6.5; % this is accurate enough
     case '7.0.1'
       n = 7.0; % this is accurate enough
     case '7.0.4'
       n = 7.0; % this is accurate enough
     otherwise
       warning('cannot convert matlab version into a number');
       v = v;
     end
   end
   v = n;
end

----------------------------------
The aim of this list is to facilitate the discussion between users of the 
FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG 
and EEG analysis. See also 
http://listserv.surfnet.nl/archives/fieldtrip.html and 
http://www.ru.nl/fcdonders/fieldtrip.


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20070713/3647a141/attachment.html>


More information about the fieldtrip mailing list