Authored by Anthony Boyer

Fix how to manage ', p, - in electrode label.

@@ -135,7 +135,7 @@ for i0 = 1:size(t,1) @@ -135,7 +135,7 @@ for i0 = 1:size(t,1)
135 sensLtmp = Sensors.label{i1}; 135 sensLtmp = Sensors.label{i1};
136 sensLtmp(ismember(double(sensLtmp),[',' ';' '-'])) =''; 136 sensLtmp(ismember(double(sensLtmp),[',' ';' '-'])) ='';
137 Sensors.label{i1} = sensLtmp; 137 Sensors.label{i1} = sensLtmp;
138 - iChanPos = findChannel(Sensors.label{i1}, Name); 138 + iChanPos = findChannel(Sensors.label{i1}, Name, 'all_upper');
139 % If the channel was already found in the list before: check the best option based on the case 139 % If the channel was already found in the list before: check the best option based on the case
140 if ~isempty(iChanPos) && ~isempty(chMatchLog) 140 if ~isempty(iChanPos) && ~isempty(chMatchLog)
141 iPrevious = find(strcmp(Name{iChanPos}, chMatchLog(:,2))); 141 iPrevious = find(strcmp(Name{iChanPos}, chMatchLog(:,2)));
@@ -162,7 +162,7 @@ for i0 = 1:size(t,1) @@ -162,7 +162,7 @@ for i0 = 1:size(t,1)
162 % Copy channel name from input name file (ADDED BY FT 5-Oct-2018) 162 % Copy channel name from input name file (ADDED BY FT 5-Oct-2018)
163 chMatchLog{end+1,1} = Sensors.label{i1}; 163 chMatchLog{end+1,1} = Sensors.label{i1};
164 chMatchLog{end,2} = Name{iChanPos}; 164 chMatchLog{end,2} = Name{iChanPos};
165 - Sensors.label{i1} = Name{iChanPos}; 165 + Sensors.label{i1} = strrep(Name{iChanPos},'-','');
166 else 166 else
167 disp(['ImaGIN> WARNING: ' Sensors.label{i1} ' not assigned']); 167 disp(['ImaGIN> WARNING: ' Sensors.label{i1} ' not assigned']);
168 chNotFound{end+1} = Sensors.label{i1}; 168 chNotFound{end+1} = Sensors.label{i1};
@@ -392,6 +392,8 @@ function iChanPos = findChannel(Label, List, caseType) @@ -392,6 +392,8 @@ function iChanPos = findChannel(Label, List, caseType)
392 392
393 % Remove spaces 393 % Remove spaces
394 Label(Label == ' ') = []; 394 Label(Label == ' ') = [];
  395 + % Remove spaces
  396 + List = strrep(List,'-','');
395 % Switch case type 397 % Switch case type
396 switch (caseType) 398 switch (caseType)
397 case 'no_change' 399 case 'no_change'