plotting planar gradient data

Floris de Lange florisdelange at GMAIL.COM
Thu Apr 10 16:26:11 CEST 2008

Salut Fieldtrippers,

I am wondering whether there is a small bug in the routine that transforms
data to planar gradient (or alternatively, I'm doing something stupid).  

After I have created an average ERF, using timelockanalysis, I transform my
data to planar gradient using the following two commands:

cfg = [];
cfg.planarmethod = 'sincos';
erf_planar = megplanar(cfg,erf_axial);
erf_planarcomb = combineplanar([],erf_planar);

Now, several fields are gone/not compatible anymore with the plotting routines. 

First of all, I have to add a dimord-field:
erf_planarcomb.dimord = 'chan_time';

Then, the time-field gets encapsulated in a structure, which the plotting
routines don't like, so I have to specify:
erf_planarcomb.time = erf_planarcomb.time{1};

And the same for the data field:
erf_planarcomb.avg = erf_planarcomb.trial{1};

Is this a bug, or am I doing something wrong? 
If I look at the ERF-tutorial
all these steps don't seem necessary..

Thanks for your feedback,
All the best,

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 and

More information about the fieldtrip mailing list