<div dir="ltr">Sorry guys I attach the script I used:<div><br></div><div><div>cfg = [];</div><div>cfg.method     = 'mtmfft';</div><div>cfg.taper  = 'hanning';</div><div>cfg.foi        = [4:1:8];</div><div>freqmw1theta  = ft_freqanalysis(cfg, mw1);</div>
<div>freqmw2theta  = ft_freqanalysis(cfg, mw2);</div><div>freqmw3theta  = ft_freqanalysis(cfg, mw3);</div><div>freqmw4theta  = ft_freqanalysis(cfg, mw4);</div><div>freqmw5theta  = ft_freqanalysis(cfg, mw5);</div><div>freqmw6theta  = ft_freqanalysis(cfg, mw6);</div>
<div>freqmw7theta  = ft_freqanalysis(cfg, mw7);</div><div>freqmwe1theta  = ft_freqanalysis(cfg, mwe1);</div><div>freqmwe2theta  = ft_freqanalysis(cfg, mwe2);</div><div>freqmwe3theta  = ft_freqanalysis(cfg, mwe3);</div><div>
freqmwe4theta  = ft_freqanalysis(cfg, mwe4);</div><div>freqmwe5theta  = ft_freqanalysis(cfg, mwe5);</div><div>freqmwe6theta  = ft_freqanalysis(cfg, mwe6);</div><div>freqmwe7theta  = ft_freqanalysis(cfg, mwe7);</div><div><br>
</div><div><br></div><div>cfg = [];</div><div>cfg.method     = 'mtmfft';</div><div>cfg.taper  = 'hanning';</div><div>cfg.foi        = [8:1:12];</div><div>freqmw1alpha  = ft_freqanalysis(cfg, mw1);</div><div>
freqmw2alpha  = ft_freqanalysis(cfg, mw2);</div><div>freqmw3alpha  = ft_freqanalysis(cfg, mw3);</div><div>freqmw4alpha  = ft_freqanalysis(cfg, mw4);</div><div>freqmw5alpha  = ft_freqanalysis(cfg, mw5);</div><div>freqmw6alpha  = ft_freqanalysis(cfg, mw6);</div>
<div>freqmw7alpha  = ft_freqanalysis(cfg, mw7);</div><div>freqmwe1alpha  = ft_freqanalysis(cfg, mwe1);</div><div>freqmwe2alpha  = ft_freqanalysis(cfg, mwe2);</div><div>freqmwe3alpha  = ft_freqanalysis(cfg, mwe3);</div><div>
freqmwe4alpha  = ft_freqanalysis(cfg, mwe4);</div><div>freqmwe5alpha  = ft_freqanalysis(cfg, mwe5);</div><div>freqmwe6alpha  = ft_freqanalysis(cfg, mwe6);</div><div>freqmwe7alpha  = ft_freqanalysis(cfg, mwe7);</div></div>
<div><br></div><div><div>cfg = [ ];</div><div>cfg.parameter  = 'powspctrm';</div><div>cfg.avgoverfreq  = 'yes';</div><div>amw1 = ft_selectdata_new(cfg, freqmw1alpha);</div><div>amw2 = ft_selectdata_new(cfg, freqmw2alpha);</div>
<div>amw3 = ft_selectdata_new(cfg, freqmw3alpha);</div><div>amw4 = ft_selectdata_new(cfg, freqmw4alpha);</div><div>amw5 = ft_selectdata_new(cfg, freqmw5alpha);</div><div>amw6 = ft_selectdata_new(cfg, freqmw6alpha);</div><div>
amw7 = ft_selectdata_new(cfg, freqmw7alpha);</div><div>amwe1 = ft_selectdata_new(cfg, freqmwe1alpha);</div><div>amwe2 = ft_selectdata_new(cfg, freqmwe2alpha);</div><div>amwe3 = ft_selectdata_new(cfg, freqmwe3alpha);</div>
<div>amwe4 = ft_selectdata_new(cfg, freqmwe4alpha);</div><div>amwe5 = ft_selectdata_new(cfg, freqmwe5alpha);</div><div>amwe6 = ft_selectdata_new(cfg, freqmwe6alpha);</div><div>amwe7 = ft_selectdata_new(cfg, freqmwe7alpha);</div>
<div>tmw1 = ft_selectdata_new(cfg, freqmw1theta);</div><div>tmw2 = ft_selectdata_new(cfg, freqmw2theta);</div><div>tmw3 = ft_selectdata_new(cfg, freqmw3theta);</div><div>tmw4 = ft_selectdata_new(cfg, freqmw4theta);</div><div>
tmw5 = ft_selectdata_new(cfg, freqmw5theta);</div><div>tmw6 = ft_selectdata_new(cfg, freqmw6theta);</div><div>tmw7 = ft_selectdata_new(cfg, freqmw7theta);</div><div>tmwe1 = ft_selectdata_new(cfg, freqmwe1theta);</div><div>
tmwe2 = ft_selectdata_new(cfg, freqmwe2theta);</div><div>tmwe3 = ft_selectdata_new(cfg, freqmwe3theta);</div><div>tmwe4 = ft_selectdata_new(cfg, freqmwe4theta);</div><div>tmwe5 = ft_selectdata_new(cfg, freqmwe5theta);</div>
<div>tmwe6 = ft_selectdata_new(cfg, freqmwe6theta);</div><div>tmwe7 = ft_selectdata_new(cfg, freqmwe7theta);</div><div><br></div><div>atmw1 = amw1;</div><div>atmw2 = amw2;</div><div>atmw3 = amw3;</div><div>atmw4 = amw4;</div>
<div>atmw5 = amw5;</div><div>atmw6 = amw6;</div><div>atmw7 = amw7;</div><div>atmwe1 = amwe1;</div><div>atmwe2 = amwe2;</div><div>atmwe3 = amwe3;</div><div>atmwe4 = amwe4;</div><div>atmwe5 = amwe5;</div><div>atmwe6 = amwe6;</div>
<div>atmwe7 = amwe7;</div><div><br></div><div>atmw1.powspctrm = amw1.powspctrm./tmw1.powspctrm;</div><div>atmw2.powspctrm = amw2.powspctrm./tmw2.powspctrm;</div><div>atmw3.powspctrm = amw3.powspctrm./tmw3.powspctrm;</div>
<div>atmw4.powspctrm = amw4.powspctrm./tmw4.powspctrm;</div><div>atmw5.powspctrm = amw5.powspctrm./tmw5.powspctrm;</div><div>atmw6.powspctrm = amw6.powspctrm./tmw6.powspctrm;</div><div>atmw7.powspctrm = amw7.powspctrm./tmw7.powspctrm;</div>
<div>atmwe1.powspctrm = amwe1.powspctrm./tmwe1.powspctrm;</div><div>atmwe2.powspctrm = amwe2.powspctrm./tmwe2.powspctrm;</div><div>atmwe3.powspctrm = amwe3.powspctrm./tmwe3.powspctrm;</div><div>atmwe4.powspctrm = amwe4.powspctrm./tmwe4.powspctrm;</div>
<div>atmwe5.powspctrm = amwe5.powspctrm./tmwe5.powspctrm;</div><div>atmwe6.powspctrm = amwe6.powspctrm./tmwe6.powspctrm;</div><div>atmwe7.powspctrm = amwe7.powspctrm./tmwe7.powspctrm;</div><div><br></div><div>cfg_neighb        = [];</div>
<div>cfg_neighb.method = 'distance';         </div><div>neighbours        = ft_prepare_neighbours(cfg_neighb, mwe1);</div><div><br></div><div><br></div><div>ntrials = 7;<br></div><div>cfg = [];</div><div>cfg.method      = 'montecarlo';</div>
<div>cfg.statistic   = 'depsamplesT';</div><div>cfg.parameter   = 'powspctrm';</div><div>cfg.correctm    = 'cluster';</div><div>cfg.template = 'easycapM11_neighb.mat';</div><div>cfg.neighbours    = neighbours;</div>
<div>cfg.numrandomization = 5000;</div><div>cfg.avgoverfreq = 'yes';</div><div>cfg.alpha       = 0.05;</div><div>cfg.tail        = 0;</div><div>design = [ones(1,ntrials) ones(1,ntrials)*2];</div><div>cfg.design = design;</div>
<div>cfg.uvar        = 1; </div><div>cfg.ivar        = 2; </div><div><br></div><div>statat = ft_freqstatistics(cfg, atmwe1, atmwe2, atmwe3, atmwe4, atmwe5,...</div><div>    atmwe6, atmwe7, atmw1, atmw2, atmw3, atmw4, atmw5,...</div>
<div>    atmw6, atmw7);</div></div><div><br></div><div><br></div><div><br></div><div>the error I have is:</div><div><div>Undefined function or variable "param".</div><div><br></div><div>Error in seloverdim (line 57)</div>
<div>for i = 1:numel(param)</div><div><br></div><div>Error in ft_selectdata_old (line 601)</div><div>    if selectfoi,  data = seloverdim(data, 'freq', selfoi,  fb); end</div><div><br></div><div>Error in ft_selectdata (line 45)</div>
<div>  [varargout{1:nargout}] = ft_selectdata_old(varargin{:});</div><div><br></div><div>Error in ft_freqstatistics (line 245)</div><div>    data =  ft_selectdata(data, 'param', cfg.parameter, 'avgoverrpt', false,</div>
<div>    ...</div></div><div><br></div><div><br></div><div>hope is more clear</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 2 April 2014 12:42, jan-mathijs schoffelen <span dir="ltr"><<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Not if you don't provide us with some more input.<div>Jan-Mathijs</div><div><br><div>
<div><div class="h5"><div>On Apr 2, 2014, at 12:31 PM, Marco Rotonda wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5"><div dir="ltr">Hi all,<div>I would like to compute a simple alpha-theta ratio and do some statistics on it.</div>
<div>I had my data from freqanalysis.</div><div>Then I averaged with selectdata_new to have the mean for a band.</div>
<div>Then the simple ratio for each channel.</div><div>If now I call freqstatistics I have an error.</div><div>Any suggestion?</div><div><br></div><div>Thanks</div><div><br></div><div>Marco</div></div></div></div><div class="">

_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>
</blockquote></div><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<div>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div>
<div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl" target="_blank">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: <a href="tel:%2B31-24-3614793" value="+31243614793" target="_blank">+31-24-3614793</a></div>
<div><br></div><div><a href="http://www.hettaligebrein.nl" target="_blank">http://www.hettaligebrein.nl</a></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>