Authored by Anthony Boyer

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

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