<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Good morning Julian, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Can you help me with plotting some resting state EEG signals? I am new in Fieldtrip and I dont find clear information about this topic and I dont really know how to do plottings in Fieldtrip. I feel like the fieldtrip documentation is a little bit weak....</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thank you in advance, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Best regards, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Irene Varela</div></div><br><div class="gmail_quote"><div dir="ltr">El vie., 4 ene. 2019 a las 14:08, Julian Keil (<<a href="mailto:julian.keil@gmail.com">julian.keil@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hi Irene,<div><br></div><div>what is the reason to use the extra checkdata step?</div><div>The function checks if the input data has the correct „datatype“ field.</div><div>Since you probably don’t have that field, the function will throw an error.</div><div><br></div><div>Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab .set to a fieldtrip-like structure.</div><div><br></div><div>Best,</div><div><br></div><div>Julian</div><div><br></div><div><div><br><blockquote type="cite"><div>Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz <<a href="mailto:irene.varela@alumni.mondragon.edu" target="_blank">irene.varela@alumni.mondragon.edu</a>>:</div><br class="gmail-m_-8045396301063702243Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me?</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i><br></i></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i>Error using ft_checkdata (line 525)</i></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i>This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq.</i></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i><br></i></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The code is the following:</div><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>clc; clear all; close all;</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>clear variables</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>restoredefaultpath; % set a clean path</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>main='E:\';</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>cd='E:\fieldtrip-20181217'; % change this</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>addpath(cd);</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i><br></i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>ft_defaults;</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>load(filename, '-mat'); %Create EEG struct</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>location = EEG.chanlocs;</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>data = EEG.data; </i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i><br></i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>cfg = [];</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>cfg.xlim = [-0.2 1.0];</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>cfg.ylim = [-1e-13 3e-13];</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>cfg.channel = 'A1';</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>datos = data(1,:);</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>Ndata = numel(datos);</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>for i=1:Ndata</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i> % check if the input data is valid for this function</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i> datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>end</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i><br></i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>figure; ft_singleplotER(cfg,datos);</i></font></div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i> </i></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thank you in advance,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Irene</div><div class="gmail_default"><br></div></div></div></div></div>
_______________________________________________<br>fieldtrip mailing list<br><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br><a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br></div></blockquote></div><br></div></div>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>