<div dir="ltr"><p dir="ltr">The simplest (but not necessarily most efficient) way of doing this is:</p>
<p dir="ltr">1. Load the data (using pop_loadset() for example or through the GUI)<br>
2. Run this script (it should work correctly assuming you have<br>    more epochs than channels):<br></p><p dir="ltr">%%%%%%<br><br>% get size of data and allocate new data matrix<br>Siz = size(EEG.data);<br>NewData = zeros(fliplr(Siz));</p>
<p dir="ltr">% restrucutre the data<br>for i = 1:Siz(1)<br>    NewData(:, :, i) = squeeze(EEG.data(i, :, :))';<br>end</p><p dir="ltr">% update relevant fields<br>EEG.data = NewData;<br>EEG.nbchan = Siz(3);<br>EEG.trials = Siz(1);</p>
<p dir="ltr">% add fake channel info:<br>addchn = Siz(3) - Siz(1);</p><p dir="ltr">for a = 1:addchn<br>    num = num2str(rand(1));<br>    fakename = ['ch_', num(3:5)];<br>    EEG.chanlocs(Siz(1)+a) = EEG.chanlocs(Siz(1) - mod(a, Siz(1)));<br>
    EEG.urchanlocs(Siz(1)+a) = EEG.urchanlocs(Siz(1) - mod(a, Siz(1)));<br>    EEG.chanlocs(Siz(1)+a).labels = fakename;<br>    EEG.urchanlocs(Siz(1)+a).labels = fakename;<br>end</p><p dir="ltr">% trim the epoch structure<br>
EEG.epoch(end -(addchn - 1):end) = [];</p><p dir="ltr">% redraw eeglab GUI<br>eeglab redraw<br>clear NewData a num fakename Siz i addchn</p><p dir="ltr">%%%%%%</p><p>3. Now using standard channel (scroll) plotting<br>    will show you epochs as electrodes and vice<br>
    versa. If it does not work correctly - let me know.</p>
</div>