<div dir="ltr">Dear Fieldtrippers,<div><br></div><div>I've been trying to do a source analysis on a dataset with two conditions, mostly following the tutorials and examples from the Fieldtrip site, and come upon a problem; it won't plot. While the source analysis is not an essential component of the analysis of this dataset (it's more along the lines of "let's see if I can do this"), and I don't expect any result other than something like "there might be a source in the left hemisphere", I'd still would like to found out why it's not working.</div>


<div><br></div><div>Essentially, I create a standard headmodel cause I don't have individual MRI's from the "Subject1.mri"-example, using ft_volumesegment, ft_prepare_headmodel and ft_prepare_sourcemodel, and try to get Fieldtrip to find sources based on individual EEG-datasets using ft_freqanalysis (with cfg.method = 'mtmfft') and ft_sourceanalysis. </div>


<div>After that, I use ft_sourcegrandaverage to produce, well, a grand average source, and feed this via ft_sourceinterpolate to ft_sourceplot.</div><div><br></div><div>Now, ft_sourceplot has three plotting possibilities: slice, ortho, and surface. Initially I tried to get the ortho-option to work, but this gave the following error:</div>


<div><div><i>Attempted to access dim(3); index out of bounds because numel(dim)=2.</i></div><div><i>Error in ==> cornerpoints at 11<br></i></div></div><div><i>Error in ==> ft_plot_slice at 157<br></i></div><div><br>

</div><div>So, I tried the surf-option, which gave me this:</div><div><i>Undefined function or variable "val".</i><br></div><div><div><i>Error in ==> ft_sourceplot at 1174<br></i></div></div><div><br></div><div>

And finally, I tried the slice-option, which gave one of two errors (which seems to be based on how many slices I requested):</div>
<div style><i>Out of memory</i></div><div>Which is pretty damn impressive since I've got 8GB of RAM and a pagefile topping of at 40GB</div><div>Or, the mildly disconcerting:</div><div><i>Matlab has encountered an internal error and has to close</i></div>

<div style>Which seems to have been caused by a so-called <i>"Segmentation violation"<br></i></div><div><br></div><div>Can anyone offer any insight in these errors? I think I'm doing something wrong pretty early on, but have no idea what it is.</div>


<div><br></div><div>Sincerely,</div><div><br></div><div>Casper van Heck</div></div>