The problem is that I keep running into the error shown below. Before the error pops up, I get a lot of warnings 'Matrix is close to singular or badly scaled. Results may be inaccurate.' Is this because of lack of variation in the brain activation? Wouldn't that be expected in some voxels?
Can anyone help me to solve this error?
Thanks in advance,
Marjolein
Matrix index is out of range for deletion.
Error in setup_boot_samples (line 44)
bootsam(:, wh_bad) = [];
Error in mediation/add_boot_samples_needed (line 804)
bootsam_Be = setup_boot_samples(x, Be);
Error in mediation (line 353)
add_boot_samples_needed();
Error in mediation_search (line 143)
[paths, stat] = mediation(X, Y, M(:,region), varargin{:}, 'persistent', extra_args{:},
'pvals_for_boot', pvals_for_boot, 'arorder', arorder);
Error in mediation_brain/process_slice (line 259)
slice_results = mediation_search('M', X, Y, M(:,whvox), varargin{:});
Error in mediation_brain (line 221)
process_slice();