# Problem with DipoleSimulation

jan-mathijs schoffelen j.schoffelen at PSY.GLA.AC.UK
Mon Dec 29 10:36:50 CET 2008

```> From: jan-mathijs schoffelen <jan at psy.gla.ac.uk>
> Date: December 29, 2008 9:22:40 AM BST
> To: FieldTrip discussion list <FIELDTRIP at NIC.SURFNET.NL>
> Subject: Re: [FIELDTRIP] Problem with DipoleSimulation
>
>
> Dear Luis,
>
> The trick is to define the moment-matrix as 6-by-2, i.e. nx3-by-n.
> It should look like this:
>
> [Mx 0
> My 0
> Mz 0
> 0  Mx2
> 0  My2
> 0  Mz2]
>
> In this case the matrix-multiplication should work out fine.
>
> Best,
>
> Jan-Mathijs
>
>
> On Dec 27, 2008, at 12:35 PM, Luis Morán wrote:
>
>> Dear collegues!
>>
>> I'm new on fieldtrip so I'd be very pleased if someone could help me.
>>
>> I have a problem while using dipolesimulation. I'm trying to make
>> a simulation with 2 dipoles. I introduce the position as a 2-by-3
>> matrix, and the moment as a 3-by-2.
>>
>> My problem comes when the leadfield is calculated. lf is m-by-n
>> matrix where m is the number of channels and n is 2*number of
>> dipoles. Then, in the script this lf is multiplied by dipmom (a 3-
>> by-Ndipoles matrix) and by dippos (a N-dipoles -by- 3). So this
>> operation only works when we have only one dipole.
>>
>>
>> --
>> Luis Morán Rodríguez
>>
>> Altentic
>>
>> lmoran at altentic.com
>> ----------------------------------
>>
>> 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.
>>
>> http://listserv.surfnet.nl/archives/fieldtrip.html
>>
>> http://www.ru.nl/fcdonders/fieldtrip/
>>
>
> ----------------------------------
>
> 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.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>

----------------------------------
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 http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20081229/ed64bfc6/attachment-0002.html>
```