Browse Source

Dateien hochladen nach 'code_MATLAB'

Ece Boran 4 years ago
parent
commit
d8cd7b5139
1 changed files with 4 additions and 5 deletions
  1. 4 5
      code_MATLAB/Load_Data_Example_Script.m

+ 4 - 5
code_MATLAB/Load_Data_Example_Script.m

@@ -7,7 +7,7 @@ addpath('nix-mx_Win64_1.4.1\')
 file_path = 'Data_Subject_01_Session_01.h5';
 f = nix.File(file_path,nix.FileMode.ReadOnly);
 
-%% Read metadata 
+%% Read metadata
 % Display names of all sections
 cellfun(@(x) disp(x.name),f.sections)
 
@@ -80,7 +80,7 @@ for nProperty = 1:length(sectionSingleTrial.properties)
         case {'double','logical'}
             fprintf([sectionSingleTrial.properties{nProperty}.name,': ',num2str(sectionSingleTrial.properties{nProperty}.values{1}.value),'\n'])
         otherwise
-    fprintf([sectionSingleTrial.properties{nProperty}.name,': ',sectionSingleTrial.properties{nProperty}.values{1}.value,'\n'])
+            fprintf([sectionSingleTrial.properties{nProperty}.name,': ',sectionSingleTrial.properties{nProperty}.values{1}.value,'\n'])
     end
 end
 
@@ -149,7 +149,7 @@ TrialEvents_ScalpEEG = group_TrialEvents_iEEG.tags(indTrialTags_ScalpEEG);
 cellfun(@(x) disp(x.name),TrialEvents_iEEG)
 cellfun(@(x) disp(x.name),TrialEvents_ScalpEEG)
 
-%% Time of a single event 
+%% Time of a single event
 nEvent = 3; % Maintenance
 fprintf(['Event name: ',TrialEvents_iEEG{nEvent}.name,'\n'])
 fprintf([sprintf('Time w.r.t. fixation: %.1f %s',TrialEvents_iEEG{nEvent}.position(2),TrialEvents_iEEG{nEvent}.units{1}),'\n'])
@@ -206,11 +206,10 @@ sourceUnit.sources{2}.name
 
 %% Use electrode map to get properties of the macroelectrode the unit is on
 groupiEEGElecrodes = block.openGroup('iEEG electrode information');
- 
+
 nElectrode = find(strcmpi(cellfun(@(x) x.name,groupiEEGElecrodes.sources,'UniformOutput',0),sourceUnit.name));
 
 % MNI coordinates of the electrode
 groupiEEGElecrodes.multiTags{1}.retrieveFeatureData(nElectrode,'iEEG_Electrode_MNI_Coordinates')
 % Was the anatomical location manually entered?
 groupiEEGElecrodes.multiTags{1}.retrieveFeatureData(nElectrode,'iEEG_Electrode_Manual_Entry')
-