But that doesn't solve my problem.  I've completed the simulation with 2 dipoles but using the same frequencies and phases. What I need is use a different frequency in each dipole<br><br>As I understand the dipolesimulation function at 'cfg.frequency' we can specify only a value<br>
<br>Any other advice?<br><br>Thanks a lot in advance<br><br><br>2009/4/19 jan-mathijs schoffelen <span dir="ltr"><<a href="mailto:j.schoffelen@psy.gla.ac.uk">j.schoffelen@psy.gla.ac.uk</a>></span><br><div class="gmail_quote">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Dear Luis,<br>
<br>
I guess that the desired functionality is already there, the only thing which you have to do is specifying your input configuration meaningfully.<br>
The most relevant line is line 215, which states (more or less) trial = lf * dipmom * dipsignal;<br>
<br>
lf contains the leadfield (forward model) for the dipoles at the positions in cfg.dip.pos, and has dimensionality Nchan x (Ndipolex3), so it is a concatenation (in the columns) of the single position's leadfields.<br>

dipsignal is an NdipolexNtime matrix containing the dipoles' time series.<br>
For the matrix product to work, dipmom should be of dimensionaity (Ndipolex3)xNdipole (right?). This is the key to the solution to your problem:<br>
<br>
cfg.dip.mom should be something like  [orix1 0;oriy1 0; oriz1 0;0 orix2;0 oriy2;0 oriz2], with ori(xyz)(1/2) specifying the moments of your dipoles.<br>
<br>
I hope this helps,<br>
<br>
Jan-Mathijs<div><div></div><div class="h5"><br>
<br>
<br>
On Apr 18, 2009, at 12:20 PM, Luis Morán wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hi dear Fieldtrippers!!<br>
<br>
I'm trying to make a dipolesimulation with two dipoles. I need to use different frequencies and phases for each dipole and I don't know very well how to modify the dipolesimulation function.<br>
<br>
Any advice?<br>
<br>
Thanks in advance<br>
<br>
Best regards<br>
-- <br>
Luis Morán Rodríguez<br>
<br>
Bioengineering Group<br>
Universidad Politecnica Madrid<br></div></div>
----------------------------------<br>
<br>
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.<br>
<br>
<a href="http://listserv.surfnet.nl/archives/fieldtrip.html" target="_blank">http://listserv.surfnet.nl/archives/fieldtrip.html</a><br>
<br>
<a href="http://www.ru.nl/fcdonders/fieldtrip/" target="_blank">http://www.ru.nl/fcdonders/fieldtrip/</a><br>
<br>
</blockquote>
<br>
----------------------------------<br>
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also <a href="http://listserv.surfnet.nl/archives/fieldtrip.html" target="_blank">http://listserv.surfnet.nl/archives/fieldtrip.html</a> and <a href="http://www.ru.nl/neuroimaging/fieldtrip" target="_blank">http://www.ru.nl/neuroimaging/fieldtrip</a>.<br>

</blockquote></div><br><br clear="all"><br>-- <br>Luis Morán Rodríguez<br><br>Altentic<br><br><a href="mailto:lmoran@altentic.com">lmoran@altentic.com</a><br>
<p>----------------------------------</p>
<p>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.</p>
<p>  http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p>  http://www.ru.nl/fcdonders/fieldtrip/</p>