Main_Plot_Figures.m 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. %% Close all figures, clear variables and command window
  2. close all
  3. clear
  4. clc
  5. %% Directory of the repository and the NIX library
  6. strMainPath = 'Human_Amygdala_MUA_sEEG_FearVideo'; % 'human_amygdala_mua_seeg_fearvideo'
  7. strNIXLibraryPath = 'nix-mx_Win64_1.4.1'; % For Mac: 'nix_mx_macOS_1.4.2_Matlab2020a'
  8. strFieldTripPath = 'fieldtrip-20200315';
  9. strGrammPath = 'gramm-master'; % https://github.com/piermorel/gramm
  10. %% Add necessary folders to the MATLAB path
  11. addpath([strMainPath,filesep,'code_MATLAB'])
  12. addpath(genpath(strNIXLibraryPath))
  13. addpath(strFieldTripPath)
  14. addpath(strGrammPath)
  15. ft_defaults
  16. warning('strMainPath should be the full path of the folder for the repository Human_Amygdala_MUA_sEEG_FearVideo (or human_amygdala_mua_seeg_fearvideo)')
  17. warning('strNIXLibraryPath should be the full path of the NIX library ''nix-mx_Win64_1.4.1''')
  18. warning('strFieldTripPath should be the full path of the FieldTrip toolbox ''fieldtrip-2020xxxx''')
  19. warning('strGrammPath should be the full path of the Gramm toolbox ''gramm-master''')
  20. %% NIX data files
  21. strNIXFileNames = dir([strMainPath,filesep,'data_NIX',filesep,'*.h5']);
  22. strNIXFileNames = {strNIXFileNames.name}';
  23. assert(~isempty(strNIXFileNames),'strMainPath should be the full path of the folder Human_Amygdala_MUA_sEEG_FearVideo')
  24. %% Figure 2
  25. nExampleNeuron = 32; % neuron 32 reproduces the publication figure
  26. fig2 = Figure_2([strMainPath,filesep,'data_NIX',filesep],nExampleNeuron);
  27. %% Figure 3
  28. fig3 = Figure_3([strMainPath,filesep,'data_NIX',filesep]);