<div dir="ltr">Hi Arjen,<div><br></div><div>Thank you, following ft_freqanalysis with ft_selectdata (and using the .avgoverfreq = 'yes') works.</div><div><br></div><div>Alea</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 1, 2018 at 7:33 PM, Arjen Stolk <span dir="ltr"><<a href="mailto:a.stolk8@gmail.com" target="_blank">a.stolk8@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">Hi Alea,<div><br></div><div>Have a look at ft_selectdata, which can do this operation for you.</div><div><br></div><div>Arjen</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, May 1, 2018 at 7:05 PM, Alea Skwara <span dir="ltr"><<a href="mailto:acskwara@ucdavis.edu" target="_blank">acskwara@ucdavis.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi All,<div><br></div><div>I am attempting to output averages within frequency bands using ft_freqanalysis. I have implemented the two-step solution provided in this discussion <a href="https://mailman.science.ru.nl/pipermail/fieldtrip/2016-October/010984.html" target="_blank">https://mailman.sci<wbr>ence.ru.nl/pipermail/fieldtrip<wbr>/2016-October/010984.html</a></div><div>resulting in the following code:</div><div><br></div><div><div>  cfg =[];</div><div>  cfg.method = 'mtmfft';</div><div>  cfg.output = 'pow';</div><div>  cfg.taper = 'hanning';</div><div>  cfg.channel = 'all';</div><div>  cfg.foilim = [fio1 foi2];   </div><div>  cfg.trials = 'all';</div><div>  cfg.keeptrials = 'no';</div><div>  freq_avg = ft_freqanalysis(cfg, data_segmented);</div><div><br></div><div>  cfg = [];</div><div>  cfg.avgoverfreq = 'yes';</div><div>  freq_avg = ft_freqanalysis(cfg, freq_avg);</div><div>  </div><div>However, when I run this, I get the following error:</div><div><br></div><div><div>the input is freq data with 73 channels, 41 frequencybins and no timebins</div><div>Error using ft_checkdata>freq2raw (line 1315)</div><div>not supported for dimord chan_freq</div><div><br></div><div>Error in ft_checkdata (line 432)</div><div>      data = freq2raw(data);</div><div><br></div><div>Error in ft_freqanalysis (line 217)</div><div>data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes');</div></div><div><br></div><div><br></div><div>Is there a different way I need to format my data beyond providing the function with the output of the first iteration of ft_freqanalysis?</div><div><br></div><div>Thank you!</div><span class="m_1943392805355660729HOEnZb"><font color="#888888"><div>Alea</div><div><br></div>-- <br><div class="m_1943392805355660729m_-4422928516850480526gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="font-size:12.8px"><font color="#0b5394">Alea C. Skwara, M.A.</font></span><div><div style="font-size:12.8px"><font color="#0b5394">PhD Candidate </font><font color="#f1c232">|</font><font color="#bf9000"> </font><font color="#0b5394">Saron Lab</font></div><div><font color="#f1c232"><a href="http://saronlab.ucdavis.edu/" target="_blank"><font color="#f1c232">http://saronlab.ucdavis.edu/</font></a><br></font></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><font color="#0b5394" style="font-size:12.8px">Center for Mind and Brain</font><font color="#f1c232" style="font-size:12.8px"> | </font><span style="font-size:12.8px;color:rgb(11,83,148)">University of California, Davis</span><font color="#0b5394"><br></font></div><div style="font-size:12.8px"><font color="#0b5394">267 Cousteau Place </font><font color="#f1c232">|</font><font color="#0b5394"> Davis CA 95616</font></div><div style="font-size:12.8px"><font color="#0b5394">Cell:</font><font color="#f1c232"> (828) 273-8595</font></div><div style="font-size:12.8px"><blockquote type="cite" style="font-size:12.8px"><div><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><p></p><font color="#860908"><p></p><p></p><p></p></font><p></p><font color="#860908"></font><p></p></div></blockquote></div></div></blockquote></div><div style="font-size:12.8px"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</font></span></div></div>
<br></div></div>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">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>
<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><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="font-size:12.8000001907349px"><font color="#0b5394">Alea C. Skwara, M.A.</font></span><div><div style="font-size:12.8000001907349px"><font color="#0b5394">PhD Candidate </font><font color="#f1c232">|</font><font color="#bf9000"> </font><font color="#0b5394">Saron Lab</font></div><div><font color="#f1c232"><a href="http://saronlab.ucdavis.edu/" target="_blank"><font color="#f1c232">http://saronlab.ucdavis.edu/</font></a><br></font></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px"><font color="#0b5394" style="font-size:12.8000001907349px">Center for Mind and Brain</font><font color="#f1c232" style="font-size:12.8000001907349px"> | </font><span style="font-size:12.8000001907349px;color:rgb(11,83,148)">University of California, Davis</span><font color="#0b5394"><br></font></div><div style="font-size:12.8000001907349px"><font color="#0b5394">267 Cousteau Place </font><font color="#f1c232">|</font><font color="#0b5394"> Davis CA 95616</font></div><div style="font-size:12.8000001907349px"><font color="#0b5394">Cell:</font><font color="#f1c232"> (828) 273-8595</font></div><div style="font-size:12.8000001907349px"><blockquote type="cite" style="font-size:12.8000001907349px"><div><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><p></p><font color="#860908"><p></p><p></p><p></p></font><p></p><font color="#860908"></font><p></p></div></blockquote></div></div></blockquote></div><div style="font-size:12.8000001907349px"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>