<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 128); font-size: 14px; font-family: Cambria, sans-serif; "><div>Dear Jorn,</div><div><br></div><div>After leaving out cfg.downsample all interpolation methods result in the same error.</div><div><br></div><div>Tadeusz</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> <<a href="mailto:fieldtrip-request@science.ru.nl">fieldtrip-request@science.ru.nl</a>><br><span style="font-weight:bold">Reply-To: </span> <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>><br><span style="font-weight:bold">Date: </span> Saturday, March 23, 2013 12:00 PM<br><span style="font-weight:bold">To: </span> <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>><br><span style="font-weight:bold">Subject: </span> fieldtrip Digest, Vol 28, Issue 46<br></div><div><br></div><blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;"><div><div><div>Send fieldtrip mailing list submissions to</div><div><span class="Apple-tab-span" style="white-space:pre"> </span><a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a></div><div><br></div><div>To subscribe or unsubscribe via the World Wide Web, visit</div><div><span class="Apple-tab-span" style="white-space:pre"> </span><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div><div>or, via email, send a message with subject or body 'help' to</div><div><span class="Apple-tab-span" style="white-space:pre"> </span><a href="mailto:fieldtrip-request@science.ru.nl">fieldtrip-request@science.ru.nl</a></div><div><br></div><div>You can reach the person managing the list at</div><div><span class="Apple-tab-span" style="white-space:pre"> </span><a href="mailto:fieldtrip-owner@science.ru.nl">fieldtrip-owner@science.ru.nl</a></div><div><br></div><div>When replying, please edit your Subject line so it is more specific</div><div>than "Re: Contents of fieldtrip digest..."</div><div><br></div><div><br></div><div>Today's Topics:</div><div><br></div><div> 1. Re: Problem with interpn function in<span class="Apple-tab-span" style="white-space:pre"> </span>ft_sourceinterpolate</div><div> (J?rn M. Horschig)</div><div><br></div><div><br></div><div>----------------------------------------------------------------------</div><div><br></div><div>Message: 1</div><div>Date: Fri, 22 Mar 2013 16:00:39 +0100</div><div>From: "J?rn M. Horschig" <<a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>></div><div>To: FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>></div><div>Subject: Re: [FieldTrip] Problem with interpn function in</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>ft_sourceinterpolate</div><div>Message-ID: <<a href="mailto:514C7217.6050609@donders.ru.nl">514C7217.6050609@donders.ru.nl</a>></div><div>Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"</div><div><br></div><div>Dear Tadeusz,</div><div><br></div><div>does it work when you leave out cfg.downsample or with another </div><div>interpolation method?</div><div><br></div><div>Best,</div><div>J?rn</div><div><br></div><div><br></div><div>On 3/21/2013 7:23 PM, T.W. Kononowicz wrote:</div><blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;"><div> Dear FieldTrip users,</div><div><br></div><div> I am trying to do some source reconstruction on ERF data (version: </div><div> fieldtrip-20130320). Everything seems to work quite well up to </div><div> ft_sourceinterpolate.</div><div><br></div><div><br></div><div> cfg = [];</div><div><br></div><div> cfg.method = 'mne';</div><div><br></div><div> cfg.grid = grid;</div><div><br></div><div> cfg.vol = template_vol;</div><div><br></div><div> cfg.grad = grad;</div><div><br></div><div> cfg.projectnoise = 'yes';</div><div><br></div><div> cfg.reducerank = 'no';</div><div><br></div><div> cfg.mne.lambda = 1e8;</div><div><br></div><div> repr2_mne = ft_sourceanalysis(cfg, repr2_cov);</div><div><br></div><div><br></div><div> The repr2_mne structure looks as follows:</div><div> >> repr2_mne</div><div> repr2_mne =</div><div> dim: [15 15 14]</div><div> time: [1x1751 double]</div><div> pos: [3150x3 double]</div><div> inside: [1x1613 double]</div><div> outside: [1x1537 double]</div><div> method: 'average'</div><div> avg: [1x1 struct]</div><div> cfg: [1x1 struct]</div><div><br></div><div> >> repr2_mne.avg</div><div> ans =</div><div> mom: {1x3150 cell}</div><div> pow: [3150x1751 double]</div><div> noisecov: {1x3150 cell}</div><div><br></div><div><br></div><div> As the next step I call the ft_sourceinterpolate:</div><div><br></div><div> cfg=[];</div><div><br></div><div> cfg.interpmethod='linear';</div><div><br></div><div> cfg.parameter='avg.pow';</div><div><br></div><div> cfg.downsample = 2;</div><div><br></div><div> cfg.feedback='yes';</div><div><br></div><div> repr2_interp=ft_sourceinterpolate(cfg, repr2_mne,template);</div><div><br></div><div><br></div><div> Then I get the following display message.</div><div><br></div><div> the input is source data with 3150 positions on a [15 15 14] grid</div><div><br></div><div> the input is volume data with dimensions [91 109 91]</div><div><br></div><div> updating homogenous coordinate transformation matrix</div><div><br></div><div> downsampling anatomy</div><div><br></div><div> downsampling inside</div><div><br></div><div> the call to "ft_volumedownsample" took 0 seconds and required the </div><div> additional allocation of an estimated 0 MB</div><div><br></div><div> selecting subvolume of 34.7%</div><div><br></div><div> reslicing and interpolating avg.pow</div><div><br></div><div><br></div><div> After that the code crashes and I get the error:</div><div><br></div><div><br></div><div> ??? Error using ==> interpn at 155</div><div><br></div><div> Wrong number of input arguments or some dimension of V is less than 2.</div><div><br></div><div><br></div><div> Error in ==> ft_sourceinterpolate>my_interpn at 494</div><div><br></div><div> av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);</div><div><br></div><div><br></div><div> Error in ==> ft_sourceinterpolate at 397</div><div><br></div><div> av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), </div><div> cfg.interpmethod,</div><div><br></div><div> cfg.feedback);</div><div><br></div><div><br></div><div> Just before crush in line 397 of ft_sourceinterpolate: av( sel) = </div><div> my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, </div><div> cfg.feedback); argument's size are:</div><div><br></div><div> size(fv)</div><div> ans =</div><div> 3150 1751</div><div><br></div><div> ax, ay, az, are:</div><div><br></div><div> size(ay)</div><div><br></div><div> ans =</div><div><br></div><div> 46 55 46</div><div><br></div><div><br></div><div> size(sel)</div><div><br></div><div> ans =</div><div><br></div><div> 116380 1</div><div><br></div><div><br></div><div> I found one similar post on the list, however its not helpful in that </div><div> case. Does anyone can spot what I'm missing here?</div><div><br></div><div><br></div><div> Thank you in advance for you help,</div><div><br></div><div><br></div><div> Tadeusz W. Kononowicz</div><div><br></div><div><br></div><div><br></div><div> _______________________________________________</div><div> fieldtrip mailing list</div><div> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a></div><div> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></blockquote><div><br></div><div><br></div><div>-- </div><div>J?rn M. Horschig</div><div>PhD Student</div><div>Donders Institute for Brain, Cognition and Behaviour</div><div>Centre for Cognitive Neuroimaging</div><div>Radboud University Nijmegen</div><div>Neuronal Oscillations Group</div><div>FieldTrip Development Team</div><div><br></div><div>P.O. Box 9101</div><div>NL-6500 HB Nijmegen</div><div>The Netherlands</div><div><br></div><div>Contact:</div><div>E-Mail: <a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a></div><div>Tel: +31-(0)24-36-68493</div><div>Web: <a href="http://www.ru.nl/donders">http://www.ru.nl/donders</a></div><div><br></div><div>Visiting address:</div><div>Trigon, room 2.30</div><div>Kapittelweg 29</div><div>NL-6525 EN Nijmegen</div><div>The Netherlands</div><div><br></div><div>-------------- next part --------------</div><div>An HTML attachment was scrubbed...</div><div>URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130322/a7384d8a/attachment-0001.html">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130322/a7384d8a/attachment-0001.html</a>></div><div><br></div><div>------------------------------</div><div><br></div><div>_______________________________________________</div><div>fieldtrip mailing list</div><div><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a></div><div><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div><div><br></div><div>End of fieldtrip Digest, Vol 28, Issue 46</div><div>*****************************************</div><div><br></div></div></div></blockquote></span></body></html>