<div dir="ltr"><div><div><div>Hi ,<br></div>I use the splint.m function to implement the spherical spline interpolation. But an error is occured:<br>??? Error using ==> rdivide<br>Matrix dimensions must agree.<br><br>Error in ==> splint at 58<br>
elc1 = elc1 ./ repmat(sqrt(sum(elc1.^2,2)), 1, 3);<br><br><br>Error in ==> eeg_interp_sph_spline_test at 50<br>     [V2, L2, L1] = splint(elc1, V, elc2)<br><br>I have written following program in Matlab<br><br><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US"> </span><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US"> </span>elc1=[x y z]';<br>
    elc2=[0.430   0.050   -0.010]';<br>    <br>     [V2, L2, L1] = splint(elc1, V, elc2)<br><br></div>with<br></div>[x y z]=[-0.0176    0.0907    0.0071<br>    0.0024    0.0924    0.0076<br>    0.0284    0.0879    0.0075<br>
   -0.0085    0.0903    0.0190<br>    0.0153    0.0895    0.0189<br>   -0.0391    0.0836    0.0089<br>   -0.0156    0.0868    0.0286<br>    0.0299    0.0823    0.0305<br>    0.0559    0.0735    0.0080<br>   -0.0329    0.0805    0.0321<br>
   -0.0043    0.0789    0.0485<br>    0.0155    0.0785    0.0468<br>    0.0462    0.0726    0.0344<br>   -0.0618    0.0683    0.0105<br>   -0.0509    0.0719    0.0289<br>   -0.0418    0.0694    0.0451<br>   -0.0200    0.0725    0.0542<br>
    0.0040    0.0690    0.0618<br>    0.0332    0.0657    0.0563<br>    0.0507    0.0593    0.0501<br>    0.0674    0.0552    0.0315<br>    0.0770    0.0510    0.0080<br>   -0.0651    0.0617    0.0234<br>   -0.0560    0.0608    0.0420<br>
   -0.0406    0.0598    0.0580<br>   -0.0080    0.0579    0.0720<br>    0.0196    0.0538    0.0729<br>    0.0444    0.0515    0.0631<br>    0.0678    0.0422    0.0471<br>    0.0803    0.0412    0.0213<br>   -0.0738    0.0546   -0.0128<br>
   -0.0782    0.0496    0.0047<br>   -0.0692    0.0506    0.0353<br>   -0.0518    0.0466    0.0611<br>   -0.0288    0.0444    0.0761<br>    0.0018    0.0412    0.0830<br>    0.0296    0.0370    0.0797<br>    0.0582    0.0294    0.0659<br>
    0.0799    0.0258    0.0392<br>    0.0902    0.0207    0.0049<br>    0.0842    0.0364   -0.0135<br>   -0.0831    0.0366    0.0188<br>   -0.0709    0.0332    0.0497<br>   -0.0493    0.0303    0.0724<br>   -0.0187    0.0239    0.0876<br>
    0.0157    0.0212    0.0889<br>    0.0488    0.0165    0.0771<br>    0.0758    0.0093    0.0526<br>    0.0905    0.0016    0.0200<br>   -0.0846    0.0327   -0.0191<br>   -0.0914    0.0153   -0.0017<br>   -0.0851    0.0124    0.0345<br>
   -0.0648    0.0150    0.0646<br>   -0.0401    0.0047    0.0834<br>    0.0295   -0.0054    0.0877<br>    0.0596   -0.0112    0.0701<br>    0.0821   -0.0158    0.0400<br>    0.0916   -0.0140    0.0023<br>    0.0909    0.0050   -0.0172<br>
   -0.0913   -0.0021    0.0158<br>   -0.0805   -0.0014    0.0459<br>   -0.0562   -0.0090    0.0732<br>   -0.0215   -0.0170    0.0885<br>    0.0119   -0.0205    0.0896<br>    0.0468   -0.0289    0.0746<br>    0.0717   -0.0317    0.0494<br>
    0.0852   -0.0321    0.0173<br>   -0.0856   -0.0313   -0.0167<br>   -0.0906   -0.0195   -0.0002<br>   -0.0861   -0.0199    0.0279<br>   -0.0681   -0.0230    0.0585<br>   -0.0375   -0.0303    0.0791<br>   -0.0029   -0.0388    0.0841<br>
    0.0277   -0.0432    0.0772<br>    0.0560   -0.0450    0.0586<br>    0.0738   -0.0459    0.0322<br>    0.0801   -0.0466    0.0005<br>    0.0692   -0.0591   -0.0177<br>   -0.0828   -0.0397    0.0127<br>   -0.0751   -0.0381    0.0389<br>
   -0.0556   -0.0426    0.0607<br>   -0.0218   -0.0555    0.0709<br>    0.0119   -0.0587    0.0707<br>    0.0402   -0.0598    0.0583<br>    0.0588   -0.0606    0.0383<br>    0.0698   -0.0602    0.0099<br>   -0.0681   -0.0592   -0.0211<br>
   -0.0770   -0.0512   -0.0056<br>   -0.0725   -0.0542    0.0200<br>   -0.0626   -0.0544    0.0415<br>   -0.0372   -0.0663    0.0531<br>   -0.0075   -0.0692    0.0613<br>    0.0157   -0.0732    0.0547<br>    0.0438   -0.0705    0.0413<br>
    0.0567   -0.0703    0.0209<br>    0.0630   -0.0678   -0.0043<br>    0.0545   -0.0723   -0.0201<br>   -0.0558   -0.0683    0.0284<br>   -0.0226   -0.0794    0.0421<br>    0.0036   -0.0823    0.0425<br>    0.0386   -0.0810    0.0235<br>
   -0.0654   -0.0655    0.0051<br>   -0.0452   -0.0802    0.0113<br>   -0.0322   -0.0824    0.0276<br>   -0.0078   -0.0884    0.0267<br>    0.0175   -0.0876    0.0247<br>    0.0282   -0.0877    0.0104<br>    0.0510   -0.0772    0.0057<br>
   -0.0193   -0.0900    0.0110<br>    0.0060   -0.0919    0.0105<br>   -0.0556   -0.0736   -0.0089<br>   -0.0287   -0.0879   -0.0060<br>   -0.0054   -0.0924   -0.0056<br>    0.0148   -0.0913   -0.0057<br>    0.0422   -0.0820   -0.0095<br>
   -0.0168   -0.0899   -0.0149<br>    0.0059   -0.0913   -0.0151<br>   -0.0258   -0.0854   -0.0253<br>   -0.0063   -0.0889   -0.0255<br>    0.0142   -0.0880   -0.0254<br>   -0.0398    0.0828   -0.0126<br>   -0.0116    0.0913   -0.0111<br>
    0.0115    0.0914   -0.0103<br>    0.0378    0.0841   -0.0101]<br><br><br>V =<br><br>    [3.3540<br>    1.9345<br>    0.5927<br>    2.6217<br>    1.3858<br>    5.1010<br>    3.2264<br>    0.3127<br>   -1.2031<br>    4.8916<br>
    2.2626<br>    0.7324<br>   -0.8725<br>    8.8664<br>    7.1630<br>    5.9588<br>    3.6880<br>    1.7445<br>   -0.4065<br>   -1.4554<br>   -2.5648<br>   -2.8607<br>    9.7859<br>    8.1602<br>    5.9181<br>    2.3645<br>
    0.3716<br>   -1.0117<br>   -2.4332<br>   -3.0173<br>    9.7933<br>   11.8346<br>   10.4268<br>    7.4601<br>    4.5098<br>    1.8013<br>   -0.3755<br>   -1.7671<br>   -2.9153<br>   -3.5252<br>   -3.2862<br>   13.3333<br>
   10.0548<br>    6.8787<br>    3.4798<br>    0.8774<br>   -0.9168<br>   -2.3297<br>   -3.1422<br>   11.8833<br>   13.2409<br>   11.6124<br>    8.3419<br>    4.8045<br>    0.6147<br>   -0.8466<br>   -2.0623<br>   -2.8388<br>
   -3.2469<br>   12.1843<br>    9.6097<br>    6.2738<br>    3.3943<br>    1.4797<br>    0.0743<br>   -1.2483<br>   -2.0240<br>    8.5136<br>   10.3840<br>    9.7096<br>    7.3371<br>    4.4194<br>    2.6834<br>    1.0785<br>
   -0.2747<br>   -1.3383<br>   -1.4970<br>   -0.4476<br>    8.3757<br>    7.6361<br>    5.7288<br>    3.4908<br>    1.8043<br>    0.7450<br>   -0.1646<br>   -0.7976<br>    6.1441<br>    7.2345<br>    7.0914<br>    6.2035<br>
    4.1770<br>    2.5408<br>    1.8116<br>    0.3820<br>   -0.1287<br>   -0.4707<br>    0.2793<br>    5.3026<br>    3.5360<br>    2.1660<br>    0.7409<br>    6.1342<br>    4.4963<br>    3.6572<br>    2.5199<br>    1.7607<br>
    1.3430<br>    0.4600<br>    3.2784<br>    2.1011<br>    5.2801<br>    3.5401<br>    2.6195<br>    2.0038<br>    0.7776<br>    3.1047<br>    2.2821<br>    3.3528<br>    2.6710<br>    1.9100<br>    5.1250<br>    2.9475<br>
    1.6662<br>    0.1915]<br><br><p style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US">I haven't found a solution though. So, what is wrong?</span></p>



<p style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US">  Thanks a lot in advance!</span></p>

<p style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"">Best,</span></p>

<p style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"">ahmed</span></p><br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/7/17 ingenieur eniso <span dir="ltr"><<a href="mailto:ingenieureniso@gmail.com" target="_blank">ingenieureniso@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>Hi Jörn and jan-mathijs,<div><div></div></div><br><br></div>thank you very much for help. <br><br>All the best<br></div>Ahmed</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br>
<br><div class="gmail_quote">
2013/7/16 jan-mathijs schoffelen <span dir="ltr"><<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>></span><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">Hi Ahmed,<div><br></div><div>For the visualization of sensor topographies, fieldtrip relies on the 'griddata' function from matlab. You can type 'doc griddata' on the matlab command line for more information. Note that this is not a function that is specific to fieldtrip.</div>

<div><br></div><div>For actual interpolation of data, FieldTrip has a ft_channelrepair function, which implements (among others) a spherical spline interpolation.</div><div><br></div><div><br></div><div>Best wishes,</div>

<div>Jan-Mathijs</div><div><br><div><div><div><div>On Jul 16, 2013, at 2:11 PM, ingenieur eniso wrote:</div><br></div></div><blockquote type="cite"><div><div><div dir="ltr">Dear all,<br>I am working on spatiotemporal mapping of 2D and 3D EEG data.<br>

<span lang="en"> <span>I want to</span> <span>develop</span> <span>the method of</span> <span>surface</span> <span>interpolation</span></span>, <span lang="en"><span>what is the function</span> <span>in</span> <span>FieldTrip</span> that <span>develops this</span> <span>interpolation</span></span> method.<br>




<br>I hope you will send me positive and helpful response.<br><p style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US">Thanks a lot in advance!</span></p>

<p style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"">Best,</span></p><p style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"">ahmed</span></p>

<br></div></div></div><div>
_______________________________________________<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" 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><br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>