1234567891011121314151617181920212223242526272829303132333435 |
- %% Close all figures, clear variables and command window
- close all
- clear
- clc
- %% Directory of the repository and the NIX library
- strMainPath = 'Human_Amygdala_MUA_sEEG_FearVideo'; % 'human_amygdala_mua_seeg_fearvideo'
- strNIXLibraryPath = 'nix-mx_Win64_1.4.1'; % For Mac: 'nix_mx_macOS_1.4.2_Matlab2020a'
- strFieldTripPath = 'fieldtrip-20200315';
- strGrammPath = 'gramm-master'; % https://github.com/piermorel/gramm
- %% Add necessary folders to the MATLAB path
- addpath([strMainPath,filesep,'code_MATLAB'])
- addpath(genpath(strNIXLibraryPath))
- addpath(strFieldTripPath)
- addpath(strGrammPath)
- ft_defaults
- warning('strMainPath should be the full path of the folder for the repository Human_Amygdala_MUA_sEEG_FearVideo (or human_amygdala_mua_seeg_fearvideo)')
- warning('strNIXLibraryPath should be the full path of the NIX library ''nix-mx_Win64_1.4.1''')
- warning('strFieldTripPath should be the full path of the FieldTrip toolbox ''fieldtrip-2020xxxx''')
- warning('strGrammPath should be the full path of the Gramm toolbox ''gramm-master''')
- %% NIX data files
- strNIXFileNames = dir([strMainPath,filesep,'data_NIX',filesep,'*.h5']);
- strNIXFileNames = {strNIXFileNames.name}';
- assert(~isempty(strNIXFileNames),'strMainPath should be the full path of the folder Human_Amygdala_MUA_sEEG_FearVideo')
- %% Figure 2
- nExampleNeuron = 32; % neuron 32 reproduces the publication figure
- fig2 = Figure_2([strMainPath,filesep,'data_NIX',filesep],nExampleNeuron);
- %% Figure 3
- fig3 = Figure_3([strMainPath,filesep,'data_NIX',filesep]);
|