<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Cambria, sans-serif; "><div><div><font face="Consolas">Dear FieldTrip users,</font></div><div><font face="Consolas"><br></font></div><div><font face="Consolas">I am trying to do some source reconstruction on ERF data (version: </font><span style="font-family: Monaco; ">fieldtrip-20130320)</span><span style="font-family: Consolas; ">. Everything seems to work quite well up to ft_sourceinterpolate. </span></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"><br></font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"><br></font></div><div style="color: rgb(0, 0, 128); "><p style="margin: 0px; "><font face="Consolas">cfg = [];</font></p><p style="margin: 0px; "><font face="Consolas">cfg.method = <span style="color: rgb(178, 69, 243); ">'mne'</span>;</font></p><p style="margin: 0px; "><font face="Consolas">cfg.grid = grid;</font></p><p style="margin: 0px; "><font face="Consolas">cfg.vol = template_vol;</font></p><p style="margin: 0px; "><font face="Consolas">cfg.grad = grad;</font></p><p style="margin: 0px; "><font face="Consolas">cfg.projectnoise = <span style="color: rgb(178, 69, 243); ">'yes'</span>;</font></p><p style="margin: 0px; "><font face="Consolas">cfg.reducerank = <span style="color: rgb(178, 69, 243); ">'no'</span>;</font></p><p style="margin: 0px; "><font face="Consolas">cfg.mne.lambda = 1e8;</font></p><p style="margin: 0px; color: rgb(37, 153, 45); "><span style="color: rgb(0, 0, 128); "><font face="Consolas">repr2_mne = ft_sourceanalysis(cfg, repr2_cov);</font></span></p></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"><br></font></div><div><font face="Consolas">The repr2_mne structure looks as follows:</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas">>> repr2_mne</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas">repr2_mne = </font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> dim: [15 15 14]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> time: [1x1751 double]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> pos: [3150x3 double]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> inside: [1x1613 double]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> outside: [1x1537 double]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> method: 'average'</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> avg: [1x1 struct]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> cfg: [1x1 struct]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"><br></font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas">>> repr2_mne.avg</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas">ans = </font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> mom: {1x3150 cell}</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> pow: [3150x1751 double]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> noisecov: {1x3150 cell} </font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"><br></font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"><br></font></div><div><font face="Consolas">As the next step I call the ft_sourceinterpolate:</font></div><div><p style="margin: 0px; "><font face="Consolas">cfg=[];</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">cfg.interpmethod=<span style="color: rgb(178, 69, 243); ">'linear'</span>;</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"><font color="#1f497d">cfg.parameter=</font><span style="color: rgb(178, 69, 243); ">'avg.pow'</span><span style="color: rgb(0, 0, 0); ">; </span></font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">cfg.downsample = 2;</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">cfg.feedback=<span style="color: rgb(178, 69, 243); ">'yes'</span>;</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">repr2_interp=ft_sourceinterpolate(cfg, repr2_mne,template);</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"><br></font></p><p style="margin: 0px; "><font face="Consolas">Then I get the following display message. </font></p><p style="margin: 0px; "></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">the input is source data with 3150 positions on a [15 15 14] grid</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">the input is volume data with dimensions [91 109 91]</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">updating homogenous coordinate transformation matrix</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">downsampling anatomy</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">downsampling inside</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">the call to "ft_volumedownsample" took 0 seconds and required the additional allocation of an estimated 0 MB</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">selecting subvolume of 34.7%</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">reslicing and interpolating avg.pow</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"><br></font></p><p style="margin: 0px; "><font face="Consolas">After that the code crashes and I get the error:</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"><br></font></p><p style="color: rgb(0, 0, 128); margin: 0px; "></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">??? Error using ==> interpn at 155</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">Wrong number of input arguments or some dimension of V is less than 2.</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"><br></font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">Error in ==> ft_sourceinterpolate>my_interpn at 494</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"> av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"><br></font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">Error in ==> ft_sourceinterpolate at 397</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"> av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod,</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"> cfg.feedback);</font></p><p style="color: rgb(0, 0, 128); "></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"><br></font></p><p style="margin: 0px; "><font face="Consolas">Just before crush in line 397 of ft_sourceinterpolate: av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, cfg.feedback); a</font><span style="font-family: Consolas; ">rgument's size are:</span></p><div style="color: rgb(0, 0, 128); "><div><font color="#1f497d" face="Consolas">size(fv)</font></div><div><font color="#1f497d" face="Consolas">ans =</font></div><div><font color="#1f497d" face="Consolas"> 3150 1751</font></div></div><p style="color: rgb(0, 0, 128); margin: 0px; "></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">ax, ay, az, are:</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">size(ay)</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">ans =</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"> 46 55 46</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"><br></font></p><p style="color: rgb(0, 0, 128); margin: 0px; "></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">size(sel)</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas">ans =</font></p><p style="color: rgb(0, 0, 128); margin: 0px; "><font face="Consolas"> 116380 </font><font face="Monaco"> 1</font></p><div style="color: rgb(0, 0, 128); font-family: Monaco; "><br></div><p style="color: rgb(0, 0, 128); "></p><p style="color: rgb(0, 0, 128); "></p><p style="margin: 0px; "><font face="Consolas">I found one similar post on the list, however its not helpful in that case. Does anyone can spot what I'm missing here?</font></p><p style="margin: 0px; "><font face="Consolas"><br></font></p><p style="margin: 0px; "><font face="Consolas">Thank you in advance for you help,</font></p><p style="margin: 0px; "><font face="Consolas"><br></font></p><p style="margin: 0px; "><font face="Consolas">Tadeusz W. Kononowicz</font></p></div></div></body></html>