plotLFP.m 490 B

1234567891011121314151617181920212223242526
  1. %plot LFP files
  2. %requires eeglab
  3. clear; close all; clc;
  4. addpath(genpath('/Volumes/DATA/matlab/eeglab/'));
  5. drIN = 'MAT_EEG/';
  6. files = dir([drIN '*.mat']);
  7. %file index to plot
  8. fI = 1;
  9. fnEEG = files(fI).name;
  10. %make color array
  11. cols = {'k';'r';'k';'r';'k';'r';'k';'r'};
  12. colors = [];
  13. for i = 1:8
  14. for j = 1:4
  15. colors = cat(1,colors,{cols{i}});
  16. end
  17. end
  18. %plot data
  19. eegplot(eegData, 'srate', eegFS, 'winlength', 3, 'spacing', 0.001, 'color',colors );