<div class="gmail_quote">
<div>Luis,</div>
<div>Phase doesn't make much sense if frequencies are different. </div>
<div class="gmail_quote">In your simulation are you doing stimulation with two frequencies (SSVEP)? If so then you can do the simulation with two dipoles each with two frequencies. If you aren't doing stimulation then I'd think you'd just want to choose one frequency (say with an octave banwidth) for doing your source localization. </div>

<div class="gmail_quote"> </div>
<div class="gmail_quote">Does Fieldtrip have good tools for doing that sort of localization?</div>
<div class="gmail_quote">Stan</div>
<div>
<div></div>
<div class="h5">
<div class="gmail_quote"> </div>
<div class="gmail_quote">On Sun, Apr 19, 2009 at 10:22 AM, Luis Morán <span dir="ltr"><<a href="mailto:lmoranr@gmail.com" target="_blank">lmoranr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">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" target="_blank">j.schoffelen@psy.gla.ac.uk</a>></span> 
<div>
<div></div>
<div><br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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><br><br><br>On Apr 18, 2009, at 12:20 PM, Luis Morán wrote:<br><br></div></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>
<div></div>
<div>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></div></div><font color="#888888">-- <br>Luis Morán Rodríguez<br><br>Altentic<br><br><a href="mailto:lmoran@altentic.com" target="_blank">lmoran@altentic.com</a></font> 
<div>
<div></div>
<div><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><a href="http://listserv.surfnet.nl/archives/fieldtrip.html" target="_blank">http://listserv.surfnet.nl/archives/fieldtrip.html</a></p>
<p><a href="http://www.ru.nl/fcdonders/fieldtrip/" target="_blank">http://www.ru.nl/fcdonders/fieldtrip/</a></p></div></div></blockquote></div><br></div></div></div><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>