<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear all,<div><br></div><div>I would have two questions.</div><div><br></div><div><b><font size="4">1)</font></b> First one is about ft_freqanalysis: which are the units of the output, given the cfg.output='pow' and the EEG data in uV?</div><div><br></div><div><b><font size="4">2)</font></b> 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):</div><div><br></div><div><div><font face="monospace, monospace" color="#0b5394">1 -0.186808 0.232745  0.125128 0.093849 F3</font></div><div><font face="monospace, monospace" color="#0b5394">2 0.186808  0.232745  0.125128 0.093849 F4</font></div><div><font face="monospace, monospace" color="#0b5394">3 -0.225000 0.000046  0.125128 0.093849 C3</font></div><div><font face="monospace, monospace" color="#0b5394">4 0.225000  0.000046  0.125128 0.093849 C4</font></div><div><font face="monospace, monospace" color="#0b5394">5 -0.139045 -0.427979 0.125128 0.093849 O1</font></div><div><font face="monospace, monospace" color="#0b5394">6 0.139045  -0.427979 0.125128 0.093849 O2</font></div></div><div><br></div><div>This is the code I wrote to try to plot it:</div><div><br></div><div><div><font face="monospace, monospace" color="#0b5394">freq_EEG_append = freq_EEG{1}{1};   </font><font face="monospace, monospace" color="#6aa84f">% Just one sleep stage</font></div><div><font face="monospace, monospace" color="#0b5394"><br></font></div><div><font face="monospace, monospace" color="#0b5394">for i=2:6   </font><font face="monospace, monospace" color="#6aa84f">% Length(selchan)</font></div><div><font face="monospace, monospace" color="#0b5394">    freq_EEG_append.label{i,1}       = freq_EEG{1}{i}.label;</font></div><div><font face="monospace, monospace" color="#0b5394">    freq_EEG_append.powspctrm(i,:)   = freq_EEG{1}{i}.powspctrm;</font></div><div><font face="monospace, monospace" color="#0b5394">    freq_EEG_append.cfg.channel{i,1} = freq_EEG{1}{i}.cfg.channel;</font></div><div><font face="monospace, monospace" color="#0b5394">end</font></div><div><font face="monospace, monospace" color="#0b5394">    </font></div><div><font face="monospace, monospace" color="#0b5394">cfg = [];                            </font></div><div><font face="monospace, monospace" color="#0b5394">% cfg.xlim = [0.3 0.5];                </font></div><div><font face="monospace, monospace" color="#0b5394">% cfg.zlim = [0 6e-14];                </font></div><div><font face="monospace, monospace" color="#0b5394">cfg.layout = 'EEGCap.lay';   </font></div><div><font face="monospace, monospace" color="#0b5394">cfg.parameter = 'individual';</font></div><div><font face="monospace, monospace" color="#0b5394">figure;</font></div><div><font face="monospace, monospace" color="#0b5394">ft_topoplotER(cfg,freq_EEG_append);</font></div><div><font face="monospace, monospace" color="#0b5394">colorbar;</font></div></div><div><br></div><div>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.</div><div><br></div><div><div><font face="monospace, monospace" color="#0b5394">freq_EEG_append = </font></div><div><font face="monospace, monospace" color="#0b5394"><br></font></div><div><font face="monospace, monospace" color="#0b5394">   struct with fields:</font></div><div><font face="monospace, monospace" color="#0b5394">   label: {6×1 cell}<br></font></div><div><font face="monospace, monospace" color="#0b5394">   dimord: 'chan_freq'</font></div><div><font face="monospace, monospace" color="#0b5394">   freq: [1×1121 double]</font></div><div><font face="monospace, monospace" color="#0b5394">   powspctrm: [6×1121 double]</font></div><div><font face="monospace, monospace" color="#0b5394">   cfg: [1×1 struct]</font></div></div><div><br></div><div>But I'm getting the following error:</div><div><br></div><div><div><font color="#ff0000" face="monospace, monospace">Error using cell/unique (line 85)</font></div><div><font color="#ff0000" face="monospace, monospace">Input A must be a cell array of character vectors.</font></div><div><font color="#ff0000" face="monospace, monospace"><br></font></div><div><font color="#ff0000" face="monospace, monospace">Error in ft_channelselection (line 107)</font></div><div><font color="#ff0000" face="monospace, monospace">if length(datachannel)~=length(unique(datachannel))</font></div><div><font color="#ff0000" face="monospace, monospace"><br></font></div><div><font color="#ff0000" face="monospace, monospace">Error in ft_prepare_layout (line 234)</font></div><div><font color="#ff0000" face="monospace, monospace">  cfg.channel = ft_channelselection(cfg.channel, data.label);</font></div><div><font color="#ff0000" face="monospace, monospace"><br></font></div><div><font color="#ff0000" face="monospace, monospace">Error in ft_topoplotER (line 209)</font></div><div><font color="#ff0000" face="monospace, monospace">cfg.layout = ft_prepare_layout(tmpcfg, varargin{1});</font></div></div><div><br></div><div><br></div><div>Thanks in advance for your help.</div><div><br></div><div><br></div><div>Best,</div><div>Alessandro Orticoni</div></div></div></div></div></div></div>