Skip to content

Commit

Permalink
chanloc fix
Browse files Browse the repository at this point in the history
fixed channel location preservation in erplab bin operations function
  • Loading branch information
ammsimmons committed Apr 21, 2021
1 parent 29ee120 commit 81becef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions erplab_default_values.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
erplabver = '8.14'; % current erplab version
erplabrel = '15-Apr-2021'; % DOB
erplabver = '8.15'; % current erplab version
erplabrel = '21-Apr-2021'; % DOB
%ColorB = [170 180 195]/255; % old background color (until version 3)
%ColorB = [0.9216 0.8353 0.6078]; % background color for version 4
%ColorB = [0.7020 0.7647 0.8392]; % background color since version 4.0.0.3
Expand Down
15 changes: 14 additions & 1 deletion functions/erpchanoperator.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
keeplocs = 0;
end


%
% Delete chans?
%
Expand All @@ -81,6 +82,11 @@
chdelop = regexprep(chdelop,',',' ');
rewroteop = ['ERPout = delerpchan(ERPin, [' chdelop '])'];
eval([rewroteop ';'])

if keeplocs == 1

ERPout = chanlocs_matcher(ERPout,ERPin);
end
return
end

Expand All @@ -105,7 +111,12 @@
exclchanstr = vect2colon(exclchan);
rewroteop = ['ERPout = chreref(ERPin, ''' formref ''',' exclchanstr ' )'];
end
eval([rewroteop ';'])
eval([rewroteop ';']);

if keeplocs == 1

ERPout = chanlocs_matcher(ERPout,ERPin);
end
return
end
% add a dot for .*, ./ and .^ operations
Expand Down Expand Up @@ -388,4 +399,6 @@

ERPout = chanlocs_matcher(ERPout,ERPin);
end

end

0 comments on commit 81becef

Please sign in to comment.