<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Dear Constantino,<br>
      <br>
      I'm pretty confused why you want to trick FieldTrip and put
      timelock data into a frequency structure. You are aware that there
      is a ft_timelockstatistics function that can cluster in time,
      aren't you? Anyway, imho cfg.minnbchan defines how many
      neighbouring samples another samples needs to have, and a timebin
      can have max. two neighbouring samples, so it does not make much
      sense here (and I think it really applies to channels only).<br>
      <br>
      The error you describe is because FT wants to compute neighbouring
      channels, because you did not set cfg.avgoverchan='yes'. If you do
      that, it will run through smoothly without an error. However, the
      best way for you would be to write your own statfun by making a
      copy of the statfun of your choice and modifying stat.stat to be 1
      if the clustersize is < 10. That way, you could achieve what
      you want. <br>
      <br>
      Best,<br>
      Jörn<br>
      <br>
      On 7/26/2013 8:55 PM, Constantino Méndez Bértolo wrote:<br>
    </div>
    <blockquote
cite="mid:CA+OxHEp4KtDU05Nw6XNFewfLB+_OvwDKZqjZk0nYOvf6V+0D7A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Using cfg.minnbchan = 1, 5 or 40 and cfg.neighbours = []
          finds no cluster (not even with minnbchan = 1) were there was
          a cluster before (without cfg.minnbchan)<br>
        </div>
        <div><br>
        </div>
        <div>Using cfg.neighbours = 'triangulation', or 'distance', with
          or without cfg.minnbchan computes the statistics but fails
          prior to compute the clusters in the randomizations</div>
        <div><br>
        </div>
        <div>This is the error (with neighbours) V V V </div>
        <br>
        <font size="1">Error in clusterstat>makechanneighbstructmat
          (line 519)<br>
          [seld] = match_str(cfg.channel, cfg.neighbours(chan).label);<br>
          <br>
          Error in clusterstat (line 59)<br>
          channeighbstructmat = makechanneighbstructmat(cfg);<br>
          <br>
          Error in statistics_montecarlo (line 320)<br>
          [stat, cfg] = clusterstat(cfg, statrand,
          statobs,'issource',issource);<br>
          <br>
          Error in ft_freqstatistics (line 267)<br>
        </font>
        <div><font size="1"> [stat, cfg] = statmethod(cfg, dat,
            cfg.design);</font></div>
        <div><font size="1"><br>
          </font></div>
        <div><font><br>
          </font></div>
        <div><font>While it seems it is minnbchan what will be helpful,
            we do not come up with an idea. Maybe, besides tricking
            fieldtrip to think we have frequency data we should also
            trick him to believe that points in time are channels? :)<br>
          </font></div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">El 26 de julio de 2013 19:54, <a
            moz-do-not-send="true" href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a>
          <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:smoratti@psi.ucm.es" target="_blank">smoratti@psi.ucm.es</a>></span>
          escribió:<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">
              <div><br>
              </div>
              I think cfg.minnbchan, applies also to time bins.
              <div><br>
              </div>
              <div>s</div>
              <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">
                    <div>
                      <div>________________________________________________________</div>
                      <div>Stephan Moratti, PhD<br>
                        <br>
                      </div>
                      <div>see also: <a moz-do-not-send="true"
                          href="http://web.me.com/smoratti/"
                          target="_blank">http://web.me.com/smoratti/</a><br>
                        <br>
                      </div>
                      <div>
                        Universidad Complutense de Madrid</div>
                      <div>Facultad de Psicología</div>
                      <div>Departamento de Psicología Básica I</div>
                      <div>Campus de Somosaguas</div>
                      <div>28223 Pozuelo de Alarcón (Madrid)</div>
                      <div>Spain</div>
                      <div><br>
                      </div>
                      <div>and</div>
                      <div><br>
                      </div>
                      <div>Center for Biomedical Technology</div>
                      <div>Laboratory for Cognitive and Computational
                        Neuroscience</div>
                      <div>Parque Científico y Tecnológico de la
                        Universidad Politecnica de Madrid<br>
                        Campus Montegancedo</div>
                      <div>28223 Pozuelo de Alarcón (Madrid)</div>
                      <div>Spain<br>
                        <br>
                        <br>
                        email: <a moz-do-not-send="true"
                          href="mailto:smoratti@psi.ucm.es"
                          target="_blank">smoratti@psi.ucm.es</a><br>
                        Tel.:    <a moz-do-not-send="true"
                          href="tel:%2B34%20679219982"
                          value="+34679219982" target="_blank">+34
                          679219982</a></div>
                    </div>
                  </span>
                </div>
                <br>
                <div>
                  <div>El 26/07/2013, a las 18:46, Constantino Méndez
                    Bértolo escribió:</div>
                  <br>
                  <blockquote type="cite"><span
style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium">cfg.minnbchan,</span></blockquote>
                </div>
                <br>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            fieldtrip mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
            <a moz-do-not-send="true"
              href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip"
              target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        <div><font>Constantino Méndez-Bértolo<br>
          </font></div>
        <div><font>Laboratorio de Neurociencia Clínica,</font><font><span
style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">
              Centro de Tecnología Biomédica (CTB)</span></font></div>
        <p dir="ltr"
          style="text-align:justify;margin-top:0pt;margin-bottom:0pt"><font><span
style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Parque
              Científico y Tecnológico d</span></font><font><span
style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">e
              la UPM, </span></font><font><span
style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Campus
              de Montegancedo</span></font></p>
        <p dir="ltr"
          style="text-align:justify;margin-top:0pt;margin-bottom:0pt"><font><span
style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">28223
              Pozuelo de</span></font><font><span
style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">
              Alarcón, Madrid, SPAIN</span></font></p>
        <p dir="ltr"
          style="text-align:justify;margin-top:0pt;margin-bottom:0pt"><br>
        </p>
        <p dir="ltr"
          style="text-align:justify;margin-top:0pt;margin-bottom:0pt"><font><span
style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><img
                moz-do-not-send="true"
src="imap://u365154@imap.ru.nl:993/fetch%3EUID%3E/Drafts%3E44175?id=0B975KkJxc3ZdOGI2ODg4OTItYTYwNC00MDY4LTk0YzQtZDQzYzUwZjQwMWYx&export=download&hl=es"
                width="131" height="40"></span></font></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour 
Centre for Cognitive Neuroimaging
Radboud University Nijmegen 
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel:    +31-(0)24-36-68493
Web: <a class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
  </body>
</html>