[FieldTrip] Source localization

Casper van Heck caspervanheck at gmail.com
Fri Dec 21 13:43:38 CET 2012

Dear Fieldtrippers,

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.

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.
After that, I use ft_sourcegrandaverage to produce, well, a grand average
source, and feed this via ft_sourceinterpolate to ft_sourceplot.

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:
*Attempted to access dim(3); index out of bounds because numel(dim)=2.*
*Error in ==> cornerpoints at 11
*Error in ==> ft_plot_slice at 157

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

And finally, I tried the slice-option, which gave one of two errors (which
seems to be based on how many slices I requested):
*Out of memory*
Which is pretty damn impressive since I've got 8GB of RAM and a pagefile
topping of at 40GB
Or, the mildly disconcerting:
*Matlab has encountered an internal error and has to close*
Which seems to have been caused by a so-called *"Segmentation violation"

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.


Casper van Heck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121221/33846f75/attachment-0001.html>

More information about the fieldtrip mailing list