[FieldTrip] [Fieldtrip] Power spectrum units and Error in ft_topoplotER
Alessandro Orticoni
alessandro.orticoni at gmail.com
Mon Sep 3 22:16:23 CEST 2018
Dear all,
I would have two questions.
*1)* First one is about ft_freqanalysis: which are the units of the output,
given the cfg.output='pow' and the EEG data in uV?
*2)* The second one is about the topoplot. I'm trying to plot the power
spectrum over the following six channels (I created the following .lay
file):
1 -0.186808 0.232745 0.125128 0.093849 F3
2 0.186808 0.232745 0.125128 0.093849 F4
3 -0.225000 0.000046 0.125128 0.093849 C3
4 0.225000 0.000046 0.125128 0.093849 C4
5 -0.139045 -0.427979 0.125128 0.093849 O1
6 0.139045 -0.427979 0.125128 0.093849 O2
This is the code I wrote to try to plot it:
freq_EEG_append = freq_EEG{1}{1}; % Just one sleep stage
for i=2:6 % Length(selchan)
freq_EEG_append.label{i,1} = freq_EEG{1}{i}.label;
freq_EEG_append.powspctrm(i,:) = freq_EEG{1}{i}.powspctrm;
freq_EEG_append.cfg.channel{i,1} = freq_EEG{1}{i}.cfg.channel;
end
cfg = [];
% cfg.xlim = [0.3 0.5];
% cfg.zlim = [0 6e-14];
cfg.layout = 'EEGCap.lay';
cfg.parameter = 'individual';
figure;
ft_topoplotER(cfg,freq_EEG_append);
colorbar;
In the first part of the code, I created the struct freq_EEG_append
collecting the data from freq_EEG, a 1x4 cell (four sleep stages) array
whose elements (still cell array) contains six structures (six channels),
each resulting from the application of the ft_freqanalysis.
freq_EEG_append =
struct with fields:
label: {6×1 cell}
dimord: 'chan_freq'
freq: [1×1121 double]
powspctrm: [6×1121 double]
cfg: [1×1 struct]
But I'm getting the following error:
Error using cell/unique (line 85)
Input A must be a cell array of character vectors.
Error in ft_channelselection (line 107)
if length(datachannel)~=length(unique(datachannel))
Error in ft_prepare_layout (line 234)
cfg.channel = ft_channelselection(cfg.channel, data.label);
Error in ft_topoplotER (line 209)
cfg.layout = ft_prepare_layout(tmpcfg, varargin{1});
Thanks in advance for your help.
Best,
Alessandro Orticoni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180903/764329b9/attachment.html>
More information about the fieldtrip
mailing list