Back to the main page.

Bug 2217 - Implicitref not used if its label is part of a label of the other channels

Status CLOSED FIXED
Reported 2013-07-02 16:33:00 +0200
Modified 2015-07-15 13:30:46 +0200
Product: FieldTrip
Component: preproc
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Jim Herring
URL:
Tags:
Depends on:
Blocks:
See also:

Jim Herring - 2013-07-02 16:33:25 +0200

In preproc.m (line 232) if ~isempty(cfg.implicitref) && ~any(strmatch(cfg.implicitref,label)) label = {label{:} cfg.implicitref}; dat(end+1,:) = 0; end If any of the labels from 'label' partially match cfg.implicitref, the implicit reference is not added. In my case when the implicit reference is '1' the following channels are returned by the strmatch operation: '10' '11' '12' '13' '14' '15' '16' '17' '18' '19'


Jim Herring - 2013-07-02 16:39:34 +0200

I suggest changing strmatch to strcmpi as the entire string is compared with the latter function. Is strcmpi supported in older Matlab versions?


Jörn M. Horschig - 2013-07-02 16:43:54 +0200

Hi Jim, strmatch should have been replaced by match_str, a private fieldtrip function, I guess that would be the more appropriate replacement


Jim Herring - 2013-07-02 16:55:19 +0200

Seems reasonable, I'll change it then. Thanks!


Jim Herring - 2013-07-02 17:40:09 +0200

fixed. and committed.