<div dir="ltr">Hi Louisa et al,<div><br></div><div>It seems that you are actually not trying to read data in the Gtec data format, but that of simulink (which was saved as a mat file, as a matlab file). </div><div>So, you should be able to just read your mat file and then put your data in a fieldtrip data structure. </div><div><br></div><div>See: <a href="http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat">http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat</a></div><div><br></div><div>Cheers,</div><div>Stephen</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 27 September 2017 at 22:01, Louisa Bogaerts <span dir="ltr"><<a href="mailto:bog.louisa@gmail.com" target="_blank">bog.louisa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
















<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black">Hello everyone, <span></span></span></p>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black"><span> </span></span></p>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black">In the lab or Dr. Landau we recently started using a <i>g.tech EEG setup</i> and <i>Simulink</i> record the data. We used the
newest version of Fieldtrip to try analyze the data. <span></span></span></p>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black"><span> </span></span></p>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black">Simulink outputs the data as a .mat file (an example here: </span><a href="https://www.dropbox.com/s/6xgio9w81qx94bq/example.mat?dl=0" target="_blank">https://www.dropbox.com/<wbr>s/6xgio9w81qx94bq/example.mat?<wbr>dl=0</a><span style="font-size:13.5pt;font-family:Calibri;color:black">), and according to the fieldtrip documentation this data format should
now be supported: </span><span style="font-size:10pt;font-family:Calibri;color:black">e.g., </span><span style="font-size:10pt;font-family:Calibri"><a href="https://github.com/fieldtrip/fieldtrip/blob/master/fileio/ft_read_data.m" target="_blank"><span style="color:rgb(56,110,255)">https://github.com/fieldtrip/f<wbr>ieldtrip/blob/master/fileio/ft<wbr>_read_data.m</span></a>,
lines 274-276:</span></p>

<table class="m_-4932915145271634057gmail-m_-7781471377037751863m_-2351570641888524943gmail-MsoNormalTable" border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border:none">
 <tbody><tr>
  <td width="674" valign="top" style="width:674pt;border:none;padding:0cm 5.4pt">
  <p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:rgb(203,35,57)">if</span><span style="font-size:10pt;font-family:Calibri;color:rgb(27,31,34)"> </span><span style="font-size:10pt;font-family:Calibri;color:rgb(203,35,57)">any</span><span style="font-size:10pt;font-family:Calibri;color:rgb(27,31,34)">(</span><span style="font-size:10pt;font-family:Calibri;color:rgb(203,35,57)">strcmp</span><span style="font-size:10pt;font-family:Calibri;color:rgb(27,31,34)">(dataformat,
  {</span><span style="font-size:10pt;font-family:Calibri;color:rgb(6,33,79)">'bci2000_dat'</span><span style="font-size:10pt;font-family:Calibri;color:rgb(27,31,34)">, </span><span style="font-size:10pt;font-family:Calibri;color:rgb(6,33,79)">'eyelink_asc'</span><span style="font-size:10pt;font-family:Calibri;color:rgb(27,31,34)">,
  </span><span style="font-size:10pt;font-family:Calibri;color:rgb(6,33,79)">'gtec_mat'</span><span style="font-size:10pt;font-family:Calibri;color:rgb(27,31,34)">, <span></span></span></p>
  <p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:rgb(6,33,79)">'gtec_hdf5'</span><span style="font-size:10pt;font-family:Calibri;color:rgb(27,31,34)">, </span><span style="font-size:10pt;font-family:Calibri;color:rgb(6,33,79)">'mega_neurone'</span><span style="font-size:10pt;font-family:Calibri;color:rgb(27,31,34)">}))<span></span></span></p>
  </td>
 </tr>
</tbody></table>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black"><span> </span></span></p>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black">However, it seems that multiple Fieldtrip functions are
“looking” for a header file that is not found.</span></p>

<p class="m_-4932915145271634057gmail-m_-7781471377037751863m_-2351570641888524943gmail-MsoListParagraphCxSpFirst"><span style="font-size:13.5pt;font-family:Courier;color:black">-<span style="font-size:7pt;line-height:normal;font-family:'Times New Roman'">   </span></span><span style="font-size:13.5pt;font-family:Calibri;color:black">When
reading in the data with ft_read_data() we get the following error messages
(whereas simply loading them with load() works fine):</span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:black">Error using ft_notification (line 340)<span></span></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:black">unsupported header format "matlab"<span></span></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:black"> </span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:black">Error in ft_error (line 39)<span></span></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:black"> 
ft_notification(varargin{:});<span></span></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:black"> </span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:black">Error in ft_read_header (line 2325)<span></span></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:black">       
ft_error('unsupported header format "%s"', headerformat);<span></span></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:black"> </span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:black">Error in ft_read_data (line 200)<span></span></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:black">  hdr =
ft_read_header(filename, 'headerformat', headerformat, 'chanindx',<span></span></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:Calibri;color:black">  chanindx,
'checkmaxfilter', checkmaxfilter);<span></span></span></p>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black"><span> </span></span></p><p class="MsoNormal"><span style="color:black;font-family:Calibri;font-size:13.5pt">- The same error messages show when
using ft_preprocessing().</span></p>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black"><span> </span></span></p>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black">Does anyone have experience reading in and preprocessing
gtech_mat data and can he/she help us understand how to save the header info so
that fieldtrip can read it and recognise the data as gtec_mat?<span></span></span></p>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black"><span> </span></span></p>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black">Any help will be very much appreciated.<span></span></span></p>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black"><span> </span></span></p>

<p class="MsoNormal"><span style="font-size:13.5pt;font-family:Calibri;color:black">Louisa, Omri & Flor<span></span></span></p>

</div>
<br>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>