Browse Source

Upload files to 'code'

Dino Dvorak 5 months ago
parent
commit
88fac99a52
1 changed files with 26 additions and 0 deletions
  1. 26 0
      code/plotLFP.m

+ 26 - 0
code/plotLFP.m

@@ -0,0 +1,26 @@
+%plot LFP files
+%requires eeglab
+clear; close all; clc;
+
+addpath(genpath('/Volumes/DATA/matlab/eeglab/'));
+
+drIN = 'MAT_EEG/';
+files = dir([drIN '*.mat']);
+
+%file index to plot
+fI = 1;
+
+fnEEG = files(fI).name;
+
+%make color array
+cols = {'k';'r';'k';'r';'k';'r';'k';'r'};
+colors = [];
+for i = 1:8
+    for j = 1:4
+        colors = cat(1,colors,{cols{i}});
+    end
+end
+
+%plot data
+eegplot(eegData, 'srate', eegFS, 'winlength', 3, 'spacing', 0.001, 'color',colors );
+