<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Hi FieldTrippers,</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">I compile my code to run on the supercomputer cluster (without many matlab licenses), which usually works fine when I do something like:</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><div id="bloop_customfont" style="margin:0px"><i>addpath('~/Documents/fieldtrip');</i></div><div id="bloop_customfont" style="margin:0px"><i>ft_defaults; </i></div><div><div><i>addpath('~/Documents/fieldtrip/external/spm8');</i></div></div><div><div><i>mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ...</i></div><div><i> '-R', '-nodisplay', '-R', '-singleCompThread', fname);</i></div></div><div><br></div><div>However, compiling the ft_volumenormalise function gives me some problems. Specifically, if source is the result of my beamformer analysis, this code</div><div><br></div><div><div><i> cfg <span class="Apple-tab-span" style="white-space:pre"> </span>= [];</i></div><div><i> cfg.parameter <span class="Apple-tab-span" style="white-space:pre"> </span>= 'pow';</i></div><div><i> cfg.nonlinear <span class="Apple-tab-span" style="white-space:pre"> </span>= 'no'; % can warp back to individual</i></div><div><i> cfg.template <span class="Apple-tab-span" style="white-space:pre"> </span>= '/home/aeurai/Documents/fieldtrip/external/spm8/templates/T1.nii';</i></div><div><i> cfg.write <span class="Apple-tab-span" style="white-space:pre"> </span>= 'no';</i></div><div><i> cfg.keepinside <span class="Apple-tab-span" style="white-space:pre"> </span>= 'no'; % otherwise, ft_sourcegrandaverage will bug</i></div><div><i> source <span class="Apple-tab-span" style="white-space:pre"> </span>= ft_volumenormalise(cfg, source);</i></div></div></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">works fine when running it within Matlab. However, when I run the executable after compiling (which completes without error), a low-level spm function throws the following error:</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><div id="bloop_customfont" style="margin:0px"><i>the input is source data with 16777216 brainordinates on a [256 256 256] grid</i></div><div id="bloop_customfont" style="margin:0px"><i>Warning: could not reshape "freq" to the expected dimensions</i></div><div id="bloop_customfont" style="margin:0px"><i>> In ft_datatype_volume (line 136)</i></div><div id="bloop_customfont" style="margin:0px"><i>In ft_checkdata (line 350)</i></div><div id="bloop_customfont" style="margin:0px"><i>In ft_volumenormalise (line 98)</i></div><div id="bloop_customfont" style="margin:0px"><i>In B6b_sourceContrast_volNormalise (line 57)</i></div><div id="bloop_customfont" style="margin:0px"><i>Converting the coordinate system from ctf to spm</i></div><div id="bloop_customfont" style="margin:0px"><i>Undefined function 'fname' for input arguments of type 'struct'</i></div><div id="bloop_customfont" style="margin:0px"><i>Error in file_array (line 32)</i></div><div id="bloop_customfont" style="margin:0px"><i>Error in spm_create_vol>create_vol (line 77)</i></div><div id="bloop_customfont" style="margin:0px"><i>Error in spm_create_vol (line 16)</i></div><div id="bloop_customfont" style="margin:0px"><i>Error in volumewrite_spm (line 71)</i></div><div id="bloop_customfont" style="margin:0px"><i>Error in ft_write_mri (line 65)</i></div><div id="bloop_customfont" style="margin:0px"><i>Error in align_ctf2spm (line 168)</i></div><div id="bloop_customfont" style="margin:0px"><i>Error in ft_convert_coordsys (line 95)</i></div><div id="bloop_customfont" style="margin:0px"><i>Error in ft_volumenormalise (line 124)</i></div><div id="bloop_customfont" style="margin:0px"><i>Error in B6b_sourceContrast_volNormalise (line 57)</i></div><div id="bloop_customfont" style="margin:0px"><i>MATLAB:UndefinedFunction</i></div></div><div><br></div><div>I'd be very grateful for hints from anyone who's successfully compiled the ft_normalise function! Adding the template T1.nii file, spm8 or freesurfer at compilation does not solve the problem.</div><div>Thanks,</div><br><div id="bloop_sign_1488393070856733952" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px"><div>— </div><div><span style="font-family:'helvetica Neue',helvetica">Anne E. Urai, MSc</span></div><div><span style="font-family:'helvetica Neue',helvetica">PhD student | Institut für Neurophysiologie und Pathophysiologie </span></div><div><span style="font-family:'helvetica Neue',helvetica">Universitätsklinikum Hamburg-Eppendorf | </span><span style="font-family:'helvetica Neue',helvetica">Martinistrasse 52, 20246 | Hamburg, Germany </span></div><div><span style="font-family:'helvetica Neue',helvetica"><a href="http://www.anneurai.net">www.anneurai.net</a> / </span><a href="https://twitter.com/AnneEUrai"><span style="font-family:'helvetica Neue',helvetica">@AnneEUrai</span></a></div></div></div></body></html>