Error message in ft_sourcestatistics

Hi there,

I'm trying to do a paired-t test using the fieldtrip cluster analysis on whole brain source data. I have installed fieldtrip in the plugin tab as the tutorial specified, but there is an error message when I try to run the function, the message is as as follows. How should I address that?
image

.

Thank you for your time!
Victoria

You are apparently testing files that have different 3D positions:
https://github.com/fieldtrip/fieldtrip/blob/master/utilities/ft_selectdata.m#L1213

You can only test sources computed on the same cortex surface.
If your test involves multiple subjects with individual anatomies, you need to project all the sources on a template first. Read the tutorials on these topics.

Thanks! Problem solved!

Victoria! I am running in to this same problem despite having created my forward models (leadfield) and source reconstruction from a template grid included in fieldtrip (see below). Mind sharing any details on how you solved this? Thanks!

load('/../../fieldtrip-20210311/template/sourcemodel/standard_sourcemodel3d6mm');
template_grid = sourcemodel;

cfg           = [];
cfg.method    = 'basedonmni';
cfg.template  = template_grid;
cfg.nonlinear = 'yes';
cfg.mri       = mri_resliced;
cfg.unit      = 'cm';

subject_grid = ft_prepare_sourcemodel(cfg);