绘制结果:
说明:这里的脑电维度是 通道 * 采样点
函数
function plotallchs(eeg)
maxsample = max(max(eeg));
for i=1:size(eeg,1)
plot(eeg(i,:) - maxsample*(i-1),'LineWidth',2)
hold on
line([0 size(eeg,2)],[maxsample/2 - maxsample*(i-1),maxsample/2 - maxsample*(i-1)])
hold on
end
line([0 size(eeg,2)],[maxsample/2 - maxsample*(i),maxsample/2 - maxsample*(i)])
yticks([-(maxsample*15):maxsample:0])
for i=1:size(eeg,1)
ticklabels{i} = strcat('ch',num2str(16-i+1));
end
yticklabels(ticklabels)
xlim([-inf,inf])
ylim([-(maxsample*16),maxsample])
ylabel('通道')
xlabel('采样点')
end