plot_EEGepoch_dummy_var_2024_02_18.m 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. % G.V. Anguelova
  2. % 07-06-2022
  3. %% split input (X_sin) en output (Y_sin) data in train en test data
  4. % first 300 are 'epil' (=1), the last 700 normal (=0)
  5. % for test use the first 50 (epil) and the last 100 (normal)
  6. % input variabel
  7. % test
  8. X_test_epil = X_sin(1:50,:,:);
  9. X_test_nl = X_sin(901:1000,:,:);
  10. X_test = [X_test_epil; X_test_nl];
  11. % train
  12. X_train = X_sin(51:900,:,:);
  13. % output variabel
  14. % test
  15. Y_test_epil = Y_sin(1:50,:);
  16. Y_test_nl = Y_sin(901:1000,:);
  17. Y_test = [Y_test_epil; Y_test_nl];
  18. % train
  19. Y_train = Y_sin(51:900,:);
  20. %% plot dummy var
  21. for k = 101:103 % 1 figure for each epoch
  22. figure
  23. for i = 1:18 % 1 subplot for each EEG channel in 'dubbele banaan'
  24. subplot(18,1,i);
  25. plot(X_sin(k,:,i))
  26. hold on
  27. xlim([0 250]);
  28. ylim([-17 17]);
  29. ylabel(seizureLocations.labels(1,i)) % EEG channel
  30. ax = gca;
  31. ax.Position(4) = 1.5*ax.Position(4);
  32. grid on
  33. end
  34. title(k)
  35. grid on
  36. pos = get(gcf, 'Position');
  37. set(gcf, 'Position',pos+[0 0 -400 500])
  38. set(gca,'YtickLabel',{'Cz-Pz','Fz-Cz','P3-O1','C3-P3','F3-C3','Fp1-F3','P4-O2','C4-P4','F4-C4','Fp2-F4','T5-O1','T3-T5','F7-T3','Fp1-F7','T6-O2','T4-T6','F8-T4','Fp2-F8'});
  39. set(gca,'XtickLabel',{'0','1','2'});
  40. end