# [FieldTrip] Dimension of lead-field Matrix

Simon Homolle s.homolle at donders.ru.nl
Mon Oct 3 15:27:09 CEST 2016

```Dear Pooneh,

I relate to this part:

When the forward solution is computed, the lead field matrix (= channels X source points matrix) is calculated for each grid point taking into account the head model and the channel positions.

So I assume your mesh consists of 2000 grid points?

Simon Homölle
PhD Candidate
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Phone: +31-(0)24-36-65059

> On 03 Oct 2016, at 13:01, pooneh baniasad <pooneh.baniasad at gmail.com> wrote:
>
> Dear Simon,
>
> I've followed this tutorial:
> I use 'standard_1020.elc' for 'elec' and 'cortex_20484.surf.gii' for 'DipPos'.
> Is it clear or should I explain more? 🙂
>
> On Mon, Oct 3, 2016 at 11:53 AM, Simon Homolle <s.homolle at donders.ru.nl <mailto:s.homolle at donders.ru.nl>> wrote:
> Dear pooh,
>
>
> best regards,
>
> Simon Homölle
> PhD Candidate
> Donders Institute for Brain, Cognition and Behaviour
> Centre for Cognitive Neuroimaging
> Phone: +31-(0)24-36-65059
>
>>
>> Dear FieldTrip community
>>
>> I'm using the forward model to simulating EEG signal although it seems the dimension of the lead-field matrix is not correct. Here is a review of the procedure.
>>
>> First I constructed a BEM headmodel for EEG source analysis ​and then by loading the template cortex, I put the dipoles with specific current source on that. I expect the dimension of the lead-field matrix will be m*n which m=electrode's number and n=3*dipole's number but 'm' is different.
>> Since I used the template electrode 'standard_1020.elc', m = 97 according to:
>>
>>   chanpos: [97x3 double]
>>     chantype: {97x1 cell}
>>     chanunit: {97x1 cell}
>>      elecpos: [97x3 double]
>>        label: {97x1 cell}
>>         type: 'eeg1010'
>>         unit: 'mm'
>>
>> while the dimension of lead-field matrix is:  2000x122880
>> I use this function for calculating lead-field matrix:
>>
>> LF = ft_compute_leadfield(DipPos, elec, VolBEM);
>>
>> ​I do not understand why the number of raws are different​!
>>
>> ​On the other hand I guess that there is a similarity between the number of raws in the volume head model and LF matrix due to the dimension of headmodel matrix is: 2000x8000 double .​
>>
>> ​I will be so thankful if anyone can help me.​
>>
>> --
>> Bests
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip <https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip <https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
>
>
>
> --
> Bests
>