<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 Enrico,<br>
      <br>
      the error you are describing is clearly from a rather old version
      of FieldTrip, because sens.pnt is deprecated. Could you make sure
      that you are using the newest FieldTrip version? Since you load
      from c:\...\fieldtrip-20130307\... I assume that you downloaded
      the newest version already. It might be that either you have not
      updated your startup script in adding the correct FieldTrip
      version or that you are adding both, an old and a new FieldTrip
      version to your Matlab path. You could check in Matlab what
      function is being used by typing:<br>
      <small><i><br>
          which ft_prepare_vol_sens</i></small><br>
      <br>
      If you want to add only the newest FieldTrip and remove the old
      one, you can call<i> </i><small><i>restoredefaultpath</i></small>
      in Matlab. The add <font color="#000000"><font><font><font><font><font><font><font><font><font><font
                            color="#000000"><font><font><font><font><font><font><font><font><font>c:\MATLAB\R2009b\work\fieldtrip-20130307\
                                              to your path and call <small><i>ft_def</i><i>aults</i></small>.</font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font>
      That should solve the issue. Note that your Matlab is <u>definitely</u>
      calling an old FT version, because the line tyour error comes from
      does not exist anymore (i.e. it has been rewritten, because
      sens.pnt is deprecated)<br>
      <br>
      Hope it works out for you! Best,<br>
      Jörn.<br>
      <br>
      <br>
      On 3/8/2013 1:31 PM, Enrico Schulz wrote:<br>
    </div>
    <blockquote
cite="mid:CAMAKw=ZUjv15mMpikOvUOA0fXho9uasFPNKyx7ODDUN67Pm29Q@mail.gmail.com"
      type="cite"><font color="#000000"><font>Dear Lilla an<font>d Jörn,<br>
            <br>
            <font>thank you very m<font>uch f<font>or your reply on my <font>problem.
                  </font></font></font></font></font></font></font><br>
      <font>I alre<font>ady checked the example sites but g<font>ot
            still error messages<font>.<br>
              <br>
              For creating the (l<font>eadfield</font>) grid variable 
              used the temp<font>l</font>ate files provide<font>d by <font>Fieldtrip.<br>
                  <font>vol stru<font>cture: </font></font><br>
                </font></font></font></font></font></font><font
        color="#000000"><font><font><font><font><font><font><font><font><font><font
                            color="#000000"><font><font><font><font><font><font><font><font><font>load('c:\MATLAB\R2009b\work\fieldtrip-20130307\template\headmodel\standard_bem.mat');<br>
                                              <br>
                                              <font>I created a sensor<font>
                                                  structure ba<font>sed
                                                    on <font>the
                                                      "standard_1020.elc"
                                                    </font>file.<br>
                                                    <br>
                                                    <font>sens = <br>
                                                      <br>
                                                          chanpos: [65x3
                                                      double]<br>
                                                          elecpos: [65x3
                                                      double]<br>
                                                            label: {65x1
                                                      cell}<br>
                                                             type:
                                                      'ext1020'<br>
                                                             unit: 'mm'<br>
                                                              pnt: [65x3
                                                      double]</font><br>
                                                  </font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font><br>
      <font>I started creating the leadfiled:</font><br>
      cfg                         = [];<br>
      <font>c</font>fg.elec                 = sens;<br>
      cfg.vol                   = vol;<br>
      cfg.reducerank      = 3;<br>
      cfg.grid.resolution = 1;<br>
      [grid65]                  = ft_prepare_leadfield(cfg);<br>
      <br>
      <br>
      Finally I got the following error message. <br>
      <font>??? Reference to non-existent field 'pnt'.<br>
        <br>
        Error in ==> ft_prepare_vol_sens at 301<br>
            sens.pnt = sens.pnt(selsens,:);<br>
        <br>
        Error in ==> prepare_headmodel at 90<br>
        [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel',
        cfg.channel, 'order',<br>
        cfg.order);<br>
        <br>
        Error in ==> ft_prepare_leadfield at 148<br>
        [vol, sens, cfg] = prepare_headmodel(cfg, data);</font><br>
      <br>
      <br>
      <font>That error message is funny because my sens variable has a
        sens.pnt su<font>bno<font>de.</font></font></font><br>
      <br>
      I (hopefully) solved the problem by editing the <font> "</font><font
        color="#000000"><font><font><font><font><font><font><font><font
                        color="#000000"><font><font><font><font><font><font><font><font><font>
                                          ft_prepare_vol_sens"</font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font>
      function and  loading the s<font>ens variable just before the
        error line in the 295</font>. It is running now but is <font>t<font>hat
          way correct?</font></font><br>
      <br>
      Any help is highly appreciated.<br>
      Thank you very much.<br>
      Best,<br>
      Enrico<br>
      <br>
      <br>
      <div class="gmail_quote">On 5 March 2013 12:08, <span dir="ltr"><<a
            moz-do-not-send="true" href="mailto:Lilla.Magyari@mpi.nl"
            target="_blank">Lilla.Magyari@mpi.nl</a>></span> wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Enrico,<br>
          <br>
          I think more information is needed about the error messages
          and about how<br>
          you try to compute leadfield in order to help.<br>
          <br>
          If you have not encountered the FT tutorial sites, example
          scripts and<br>
          FAQs yet, maybe you can check out those as well because they
          provide<br>
          information on source-reconstruction, leadfields... etc..<br>
          (For example, a tutorial for EEG headmodels:<br>
          <a moz-do-not-send="true"
            href="http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg"
            target="_blank">http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg</a>
          and an example script<br>
          for leadfield computation:<br>
          <a moz-do-not-send="true"
            href="http://fieldtrip.fcdonders.nl/example/compute_leadfield"
            target="_blank">http://fieldtrip.fcdonders.nl/example/compute_leadfield</a>).<br>
          <br>
          Best,<br>
          Lilla<br>
          <div class="HOEnZb">
            <div class="h5"><br>
              <br>
              > Dear Fieldtrip experts,<br>
              ><br>
              > I would like to create a leadfield based on the
              standard brain provided by<br>
              > the fieldtrip package and standard electrode
              positions.<br>
              > Unfortunately, whatever I'm trying it ends up in a
              number of error<br>
              > messages.<br>
              ><br>
              > Is anybody out there who could provide some support?<br>
              ><br>
              > Thank you very much in advance,<br>
              > Best,<br>
              > Enrico<br>
              ><br>
              ><br>
              > --<br>
              > Dr. Enrico Schulz<br>
              > Postdoc<br>
              > Klinikum rechts der Isar der Technischen Universität
              München<br>
              > Neurologische Klinik und Poliklinik<br>
              > Neuro-Kopf-Zentrum<br>
              > Ismaningerstr. 22<br>
              > 81675 München<br>
              ><br>
              >  Tel.: 089-4140-7664<br>
            </div>
          </div>
          <div class="HOEnZb">
            <div class="h5">>
              _______________________________________________<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>
              <br>
              <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>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br clear="all">
      <br>
      -- <br>
      <div>Dr. Enrico Schulz<br>
      </div>
      <div>Postdoc</div>
      Klinikum rechts der Isar der Technischen Universität München<br>
      Neurologische Klinik und Poliklinik<br>
      Neuro-Kopf-Zentrum<br>
      Ismaningerstr. 22<br>
      81675 München<br>
      <br>
       Tel.: 089-4140-7664
      <br>
      <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>