瀏覽代碼

add gramm path and filesep

Valerii Chirkov 3 年之前
父節點
當前提交
f5bf3b7381
共有 1 個文件被更改,包括 34 次插入32 次删除
  1. 34 32
      code_MATLAB/Main_Plot_Figures.m

+ 34 - 32
code_MATLAB/Main_Plot_Figures.m

@@ -1,32 +1,34 @@
-%% 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\';
-strNIXLibraryPath = 'nix-mx_Win64_1.4.1\';
-strFieldTripPath = 'fieldtrip-20200315\';
-
-%% Add necessary folders to the MATLAB path
-addpath([strMainPath,'\code_MATLAB\'])
-addpath(genpath(strNIXLibraryPath))
-addpath(strFieldTripPath)
-ft_defaults
-
-warning('strMainPath should be the full path of the folder 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''')
-
-%% NIX data files
-strNIXFileNames = dir([strMainPath,'\data_NIX\*.h5']);
-strNIXFileNames = {strNIXFileNames.name}';
-
-assert(~isempty(strNIXFileNames),'strMainPath should be the full path of the folder Human_Amygdala_MUA_sEEG_FearVideo')
-
-%% Figure 1
-nExampleNeuron = 1;
-fig1 = Figure_1([strMainPath,'\data_NIX\'],nExampleNeuron);
-
-%% Figure 2
-fig2 = Figure_2([strMainPath,'\data_NIX\']);
+%% 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';
+strNIXLibraryPath = 'nix-mx_Win64_1.4.1'; % or 'nix_mx_macOS_1.4.2_Matlab2020a'
+strFieldTripPath = 'fieldtrip-20200315';
+strGrammPath = 'gramm'; % 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 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''')
+
+%% 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 1
+nExampleNeuron = 1;
+fig1 = Figure_1([strMainPath filesep 'data_NIX' filesep], nExampleNeuron);
+
+%% Figure 2
+fig2 = Figure_2([strMainPath filesep 'data_NIX' filesep]);