<div dir="ltr"><div>Hello Fieldtrippers,</div><div><br></div><div>I am doing source reconstruction using EEG channels on a fieldtrip.</div><div><br></div><div>I have computed Forward solution i.e head model using  'Openmeeg' and lead field successfully.</div>
<div><br></div><div>For the inverse solution using 'dics' method, I wrote the following syntax </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> cfg              = []; </div><div>
 cfg.method       = 'dics';</div><div> cfg.frequency    = 130;</div><div> cfg.elec         = dataFIC12.hdr.elec;</div><div> cfg.grid         = grid; </div><div> cfg.vol          = vol;</div><div><br></div><div> sourcePost = ft_sourceanalysis(cfg, freqPost);</div>
<div><br></div><div><br></div><div>and I have received the following error:</div><div><br></div><div><br></div><div><div><font color="#ff0000">??? Error using ==> mtimes</font></div><div><font color="#ff0000">Inner matrix dimensions must agree.</font></div>
<div><font color="#ff0000"><br></font></div><div><font color="#ff0000">Error in ==> beamformer_dics at 314</font></div><div><font color="#ff0000">        filt = pinv(lf' * invCf * lf) * lf' * invCf;              %</font></div>
<div><font color="#ff0000">        Gross eqn. 3, use PINV/SVD to cover rank deficient</font></div><div><font color="#ff0000">        leadfield</font></div><div><font color="#ff0000"><br></font></div><div><font color="#ff0000">Error in ==> ft_sourceanalysis at 595</font></div>
<div><font color="#ff0000">      dip(i) = beamformer_dics(grid, sens, vol, [],</font></div><div><font color="#ff0000">      squeeze(Cf(i,:,:)), optarg{:});</font></div><div><font color="#ff0000"><br></font></div><div><font color="#ff0000">Error in ==> newCode at 214</font></div>
<div><font color="#ff0000">sourcePost = ft_sourceanalysis(cfg, freqPost);</font></div></div><div><br></div><div><br></div><div><br></div><div><br></div><div>Any help would be appreciated.</div><div><br></div><div><br></div>
<div>Regards;</div><div><br></div><div><br></div><div>Mushfa Yousuf</div><div><br></div><div>Neurozentrum,</div><div>Universitätsklinikum Schleswig-Holstein, </div><div>Campus Kiel (UKSH), Deutschland</div><div><br></div>
</div>