<div dir="ltr"><div><div><div><font size="2">Dear community,<br><br></font></div><font size="2">I'm computing the beamformer filters based on the entire eeg data (based on templates headmodel). <br><br></font></div><font size="2">But when I use the precomputed common filter to calculate the sources for each condition independently I have the following error:<br><br>Subselecting/reordering the channels in the precomputed filters<br><br>Bad cell reference operation.<br>Error in ft_sourceanalysis (line 510)<br>                    grid.filter{k} = grid.filter{k}(:, i2); <br><br><br><br><br></font></div><font size="2">Here my code:<br><br><br></font><div><font size="2"><br>cfg                   = [];<br>cfg.method            = 'pcc';<br>cfg.channel           = sens.label;<br>cfg.grid              = grid;<br>cfg.vol               = vol;<br>cfg.grid.filter     = source.avg.filter;<br>source_C1 = ft_sourceanalysis(cfg,freq{isub,1});<br></font></div></div>