<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Irene,<div class=""><br class=""></div><div class="">it helps if you describe exactly what you want to do (I don’t mean to be rude or patronizing, but check here for suggestions: <a href="https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202" class="">https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202</a>).</div><div class=""><br class=""></div><div class="">There are many ways to visualize resting state EEG signals, and you don’t need fieldtrip for all of them.</div><div class="">E.g., if you just want to plot the timecourse of the data, you can use the matlab built-in „plot“ function (e.g. use something like "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to explore your data, ft_databrowser is your friend <a href="http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/" class="">http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/</a></div><div class=""><br class=""></div><div class=""><div>Best,</div><div><br class=""></div><div>Julian</div><div class=""><br class=""></div><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">________________<br class="">Prof. Dr. Julian Keil<br class=""><br class="">Biological Psychology<br class="">Olshausenstrasse 62 - R. 306<br class="">24118 Kiel, Germany<br class=""><br class="">+49 - 0431 - 880 - 4872<br class=""><a href="http://www.biopsych.uni-kiel.de/en" class="">http://www.biopsych.uni-kiel.de/en</a><br class=""><br class=""></div></div><div><br class=""><blockquote type="cite" class=""><div class="">Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz <<a href="mailto:irene.varela@alumni.mondragon.edu" class="">irene.varela@alumni.mondragon.edu</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><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 class=""></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 class=""></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 class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Irene Varela</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">El vie., 4 ene. 2019 a las 14:08, Julian Keil (<<a href="mailto:julian.keil@gmail.com" class="">julian.keil@gmail.com</a>>) escribió:<br class=""></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;" class="">Hi Irene,<div class=""><br class=""></div><div class="">what is the reason to use the extra checkdata step?</div><div class="">The function checks if the input data has the correct „datatype“ field.</div><div class="">Since you probably don’t have that field, the function will throw an error.</div><div class=""><br class=""></div><div class="">Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab .set to a fieldtrip-like structure.</div><div class=""><br class=""></div><div class="">Best,</div><div class=""><br class=""></div><div class="">Julian</div><div class=""><br class=""></div><div class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz <<a href="mailto:irene.varela@alumni.mondragon.edu" target="_blank" class="">irene.varela@alumni.mondragon.edu</a>>:</div><br class="gmail-m_-8045396301063702243Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><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 class=""></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 class=""></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 class=""><br class=""></i></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i class="">Error using ft_checkdata (line 525)</i></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i class="">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 class=""><br class=""></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" class=""><i class="">clc; clear all; close all;</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">clear variables</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">restoredefaultpath; % set a clean path</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">main='E:\';</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">cd='E:\fieldtrip-20181217'; % change this</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">addpath(cd);</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class=""><br class=""></i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">ft_defaults;</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">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" class=""><i class="">load(filename, '-mat'); %Create EEG struct</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">location = EEG.chanlocs;</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">data = EEG.data; </i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class=""><br class=""></i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">cfg = [];</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">cfg.xlim = [-0.2 1.0];</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">cfg.ylim = [-1e-13 3e-13];</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">cfg.channel = 'A1';</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">datos = data(1,:);</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">Ndata = numel(datos);</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">for i=1:Ndata</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class=""> % check if the input data is valid for this function</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class=""> datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">end</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class=""><br class=""></i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class=""><i class="">figure; ft_singleplotER(cfg,datos);</i></font></div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i class=""> </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 class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Irene</div><div class="gmail_default"><br class=""></div></div></div></div></div>
_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class=""><a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank" class="">https://doi.org/10.1371/journal.pcbi.1002202</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank" class="">https://doi.org/10.1371/journal.pcbi.1002202</a><br class="">
</blockquote></div>
_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">https://doi.org/10.1371/journal.pcbi.1002202<br class=""></div></blockquote></div><br class=""></div></body></html>