<br><font size=2 face="Arial">Hi Robert,</font>
<br>
<br><font size=2 face="Arial">In connection with your previous advice concerning
the eeglab2fieldtrip script, we came accross the following problem and
solution (see <i>script</i> below):</font>
<br>
<br><font size=2 face="Arial"><i>filename   = </i></font><font size=2 color=#8100ff face="Arial"><i>'fk
dag 5-Deci.set'</i></font><font size=2 face="Arial"><i>;</i></font>
<br><font size=2 face="Arial"><i>load(filename, </i></font><font size=2 color=#8100ff face="Arial"><i>'-mat'</i></font><font size=2 face="Arial"><i>);</i></font>
<br><font size=2 color=#3f803f face="Arial"><i>%the next line was included
because the eeglab2fieldtrip script says </i></font>
<br><font size=2 color=#3f803f face="Arial"><i>% %data.trial{index}  =
fixprecision(EEG.data(:,:,index));</i></font>
<br><font size=2 color=#3f803f face="Arial"><i>% while the variable EEG.data
only contains the name of the variable and not the data</i></font>
<br><font size=2 color=#3f803f face="Arial"><i>% the next line assigns
the data to EEG.data</i></font>
<br><font size=2 face="Arial"><i>EEG.data   = EEGDATA; </i></font>
<br><font size=2 color=#3f803f face="Arial"><i>%%%%%%</i></font>
<br><font size=2 face="Arial"><i>data       = eeglab2fieldtrip(EEG,</i></font><font size=2 color=#8100ff face="Arial"><i>'preprocessing'</i></font><font size=2 face="Arial"><i>);</i></font>
<br><font size=2 face="Arial"><i>hdr.nChans = length(data.label);</i></font>
<br><font size=2 face="Arial"><i>hdr.label  = data.label;</i></font>
<br><font size=2 face="Arial"><i>hdr.Fs     = data.fsample;</i></font>
<br><font size=2 face="Arial"><i>write_fcdc_data(filename, EEG.data, </i></font><font size=2 color=#8100ff face="Arial"><i>'header'</i></font><font size=2 face="Arial"><i>,
hdr, </i></font><font size=2 color=#8100ff face="Arial"><i>'dataformat'</i></font><font size=2 face="Arial"><i>,
</i></font><font size=2 color=#8100ff face="Arial"><i>'brainvision_eeg'</i></font><font size=2 face="Arial"><i>);</i></font>
<br>
<br><font size=2 face="Arial">I do still get the following warning after
running the above script:</font>
<br>
<br><font size=2 face="Arial"><i>Warning: writing segmented data as if
it were continuous</i></font>
<br><font size=2 face="Arial"><i>In fieldtrip-20070710\private\write_brainvision_eeg
at 38</i></font>
<br><font size=2 face="Arial"><i>In fieldtrip-20070710\private\write_data
at 63</i></font>
<br><font size=2 face="Arial"><i>In write_fcdc_data at 48</i></font>
<br><font size=2 face="Arial"><i>In ConversionEEGDATA at 13</i></font>
<br>
<br><font size=2 face="Arial">Is this problematic or is this a standard
warning following conversion to Vision Analyzer?</font>
<br><font size=2 face="Arial">In addition, I was wondering where my trial
onset markers are written to? <i>Write_fcdc_data</i> only generates a .eeg
and a .hdr file, and not a .vmrk file. </font>
<br>
<br><font size=2 face="Arial">From your earlier emails I understood that
the datamatrix should be converted to <i>ntrials X nchans X nsamples </i>before
running <i>write­_fcdc_data. </i> Currently my datamatrix consists
of <i>nchans X nsamples X ntrials.</i> <i> </i>Would you mind letting
me know how I can convert my datamatrix? Thanks a lot.</font>
<br>
<br><font size=2 face="Arial">Best,</font>
<br><font size=2 face="Arial">Valesca</font>
<br>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Robert Oostenveld <r.oostenveld@FCDONDERS.RU.NL></b>
</font>
<br><font size=1 face="sans-serif">Sent by: FieldTrip discussion list <FIELDTRIP@NIC.SURFNET.NL></font>
<p><font size=1 face="sans-serif">07/07/2007 02:09 PM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
FieldTrip discussion list <FIELDTRIP@NIC.SURFNET.NL></font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">FIELDTRIP@NIC.SURFNET.NL</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [FIELDTRIP] eeglab2fieldtrip</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>On 6 Jul 2007, at 8:27, Valesca Kooijman wrote:<br>
> The latest version of eeglab2fieldtrip gives me the same error  <br>
> message in line 146 (where it calls the fixprecission function,  <br>
> instead of in line 149).<br>
> Is there another solution? If not, which version of matlab do you
 <br>
> recommend?<br>
<br>
Matlab 7.0.1 is an old version, released around end 2004. It was  <br>
quickly superseeded with version 7.0.4 to fix some serious bugs. I  <br>
reccommend people in general to work with the latest matlab versionm,  <br>
which now is 7.4.<br>
<br>
You can fix your problem by changing the "matlabversion" function
 <br>
which is included as subfunction inside the eeglab2fieldtrip  <br>
function. Go to line 250 and replace the code there with the snippet  <br>
below. I will make the same change in the release version.<br>
<br>
Robert<br>
----<br>
<br>
function [v] = matlabversion;<br>
s = ver('matlab');<br>
v = s.Version;<br>
if ischar(v)<br>
   % try converting to a number<br>
   n = str2num(v);<br>
   if isempty(n)<br>
     switch v<br>
     case '6.5.1'<br>
       n = 6.5; % this is accurate enough<br>
     case '7.0.1'<br>
       n = 7.0; % this is accurate enough<br>
     case '7.0.4'<br>
       n = 7.0; % this is accurate enough<br>
     otherwise<br>
       warning('cannot convert matlab version into a number');<br>
       v = v;<br>
     end<br>
   end<br>
   v = n;<br>
end<br>
<br>
----------------------------------<br>
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.<br>
</tt></font>
<br>
<p>----------------------------------</p>
<p>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.</p>
<p>  http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p>  http://www.ru.nl/fcdonders/fieldtrip/</p>