<div dir="ltr">Hi Mushfa,<div><br></div><div>My guess is that the channels that have you used to compute .csdspctrm are not the same as the channels in cfg.elec.    If you set cfg.channel = freqPost.label, does that solve it?</div>

<div><br></div><div style>Cheers,</div><div style>Johanna</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/30 Mushfa Yousuf <span dir="ltr"><<a href="mailto:mushfa.yousuf@googlemail.com" target="_blank">mushfa.yousuf@googlemail.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>