<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Dear Mushfa,<br>
<br>
I think you have to compute two leadfield matrices, one for EEG
(elec) and one for MEG (grad), and then concatenate these (and
make sure that the order of sensors won't get mixed up anywhere,
because sourceanalysis just expects the leadfield matrix to be
ordered like your data. If that's not the case, you either
encounter the previous error you described or (if the number of
channels matches, but order is mixed up) it will just return wrong
source estimated activity.<br>
<br>
Best,<br>
Jörn<br>
<br>
On 5/6/2013 2:47 PM, Mushfa Yousuf wrote:<br>
</div>
<blockquote
cite="mid:CAFy9vnK21cmrFx86wLoa2WD12KXmm0HnLd-eojQu_rr7AhGzdg@mail.gmail.com"
type="cite">
<div dir="ltr">Hello;
<div><br>
</div>
<div>Yes you were right. I have defined the wrong sensors i.e
'grad' instead of 'elec' while calculating the Leadfield.</div>
<div><br>
</div>
<div>Actually I am trying to calculate Combined source
reconstruction from both EEG and MEG sensors.</div>
<div><br>
</div>
<div>Do you have any idea, how to define both elec and
grad definition while calculating first forward then inverse
solution.</div>
<div><br>
</div>
<div>Because in a fieldtrip either you can defined elec or grad
at one time.</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="font-family:arial,sans-serif;font-size:13px">Regards;</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">
<br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">Mushfa
Yousuf</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">Neurozentrum,</div>
<div style="font-family:arial,sans-serif;font-size:13px">Universitätsklinikum
Schleswig-Holstein, </div>
<div style="font-family:arial,sans-serif;font-size:13px">Campus
Kiel (UKSH), Deutschland</div>
</div>
</div>
<div class="gmail_extra">
<br>
<br>
<div class="gmail_quote">On Tue, Apr 30, 2013 at 6:23 PM,
Johanna Zumer <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:johanna.zumer@gmail.com" target="_blank">johanna.zumer@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<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>Cheers,</div>
<div>Johanna</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2013/4/30 Mushfa Yousuf <span
dir="ltr"><<a moz-do-not-send="true"
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>
<div class="h5">
<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>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a moz-do-not-send="true"
href="mailto:fieldtrip@donders.ru.nl"
target="_blank">fieldtrip@donders.ru.nl</a><br>
<a moz-do-not-send="true"
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>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a moz-do-not-send="true"
href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a moz-do-not-send="true"
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands
Contact:
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel: +31-(0)24-36-68493
Web: <a class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
</body>
</html>