<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Dear Lizzie,
<div class=""><br class="">
</div>
<div class="">You haven’t done anything wrong, and the output is exactly as expected. You almost solved it yourself, since indeed you would want to need the option cfg.avgoverfreq = ‘yes’, but this should be invoked in another function:</div>
<div class=""><br class="">
</div>
<div class="">cfg = [];</div>
<div class="">cfg.avgoverfreq = ‘yes’;</div>
<div class="">FFThann = ft_freqanalysis(cfg, FFThann);</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 06 Oct 2016, at 16:03, Shephard, Elizabeth <<a href="mailto:elizabeth.1.shephard@kcl.ac.uk" class="">elizabeth.1.shephard@kcl.ac.uk</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="divtagdefaultwrapper" style="font-style: normal; font-variant: 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-stroke-width: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Dear all</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">I am fairly new to FieldTrip so apologies if this is a very basic question...</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">I am using ft_freqanalysis and wanted to obtain average power values in frequency bands rather than power values at particular frequencies. So, following the documentation online, I specified the following:</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div class="">cfg = [];</div>
<div class=""><span style="font-size: 12pt;" class="">cfg.method = 'mtmfft'; </span><br class="">
</div>
<div class="">cfg.taper = 'hanning'; </div>
<div class="">cfg.foilim = [1 3]; % get power in delta range</div>
<div class=""><span style="font-size: 12pt;" class="">cfg.keeptrials = 'yes';</span><br class="">
</div>
<div class="">cfg.output = 'pow';</div>
<div class="">FFThann = ft_freqanalysis(cfg, data);</div>
<div class=""><br class="">
</div>
<div class="">But the powspctrm field I get in FFThann gives power values for 0.5 Hz steps across the 1-3 Hz range, rather than a single average power value for the 1-3 Hz range. </div>
<div class=""><br class="">
</div>
<div class="">I was wondering if I have specified something incorrectly? I've also tried adding "<span style="font-family: Calibri, Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols; font-size: 16px;" class="">cfg.avgoverfreq
= 'yes';" but this doesn't change the output.</span></div>
<div class=""><span style="font-family: Calibri, Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols; font-size: 16px;" class=""><br class="">
</span></div>
<div class=""><span style="font-family: Calibri, Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols; font-size: 16px;" class="">Many thanks in advance</span></div>
<div class=""><span style="font-family: Calibri, Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols; font-size: 16px;" class="">Lizzie </span></div>
<br class="">
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div id="Signature" class="">
<div id="divtagdefaultwrapper" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class="">
<div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class="">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255); margin: 0px;" class="">
<p class="MsoNormal" style="margin-top: 0px; margin-bottom: 0.0001pt;"></p>
<div style="margin-top: 0px; margin-bottom: 0.0001pt;" class=""><span style="font-family: Garamond, serif; color: rgb(31, 73, 125);" class="">---------------------------------------------------------------------------</span><span style="font-family: Garamond, serif;" class=""></span></div>
<div style="margin-top: 0px; margin-bottom: 0.0001pt;" class=""><span style="font-family: Garamond, serif; color: rgb(31, 73, 125);" class="">Lizzie Shephard, PhD</span><span style="font-family: Garamond, serif;" class=""></span></div>
<div style="margin-top: 0px; margin-bottom: 0.0001pt;" class=""><span style="font-family: Garamond, serif; color: rgb(31, 73, 125);" class="">Postdoctoral researcher</span><span style="font-family: Garamond, serif;" class=""></span></div>
<div style="margin-top: 0px; margin-bottom: 0.0001pt;" class=""><span style="font-family: Garamond, serif; color: rgb(31, 73, 125);" class="">2.21 MRC SGDP Centre</span><span style="font-family: Garamond, serif;" class=""></span></div>
<div style="margin-top: 0px; margin-bottom: 0.0001pt;" class=""><span style="font-family: Garamond, serif; color: rgb(31, 73, 125);" class="">Institute of Psychiatry, Psychology, & Neuroscience</span><span style="font-family: Garamond, serif;" class=""></span></div>
<div style="margin-top: 0px; margin-bottom: 0.0001pt;" class=""><span style="font-family: Garamond, serif; color: rgb(31, 73, 125);" class="">King’s College London</span><span style="font-family: Garamond, serif;" class=""></span></div>
<div style="margin-top: 0px; margin-bottom: 0.0001pt;" class=""><span style="font-family: Garamond, serif; color: rgb(31, 73, 125);" class="">De Crespigny Park</span><span style="font-family: Garamond, serif;" class=""></span></div>
<div style="margin-top: 0px; margin-bottom: 0.0001pt;" class=""><span style="font-family: Garamond, serif; color: rgb(31, 73, 125);" class="">London, SE5 8AF</span><span style="font-family: Garamond, serif;" class=""></span></div>
<div style="margin-top: 0px; margin-bottom: 0.0001pt;" class=""><span style="font-family: Garamond, serif; color: rgb(31, 73, 125);" class="">0207 848 5272</span><span style="font-family: Garamond, serif;" class=""></span></div>
<div style="margin-top: 0px; margin-bottom: 0.0001pt;" class=""><span style="font-family: Garamond, serif; color: rgb(31, 73, 125);" class=""><a href="mailto:elizabeth.1.shephard@kcl.ac.uk" class="">elizabeth.1.shephard@kcl.ac.uk</a></span></div>
<br class="">
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
</div>
</div>
</div>
</div>
</div>
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: 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-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: 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-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: 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-stroke-width: 0px; float: none; display: inline !important;" class="">fieldtrip
mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: 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-stroke-width: 0px;" class="">
<a href="mailto:fieldtrip@donders.ru.nl" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: 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-stroke-width: 0px;" class="">fieldtrip@donders.ru.nl</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: 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-stroke-width: 0px;" class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: 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-stroke-width: 0px;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>