Back to the main page.

Bug 586 - Problem with ft_selectdata

Reported 2011-04-19 10:31:00 +0200
Modified 2011-04-20 14:01:56 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
Depends on:
See also:

Mark - 2011-04-19 10:31:28 +0200

Input struct for ft_selectdata for selection of certain channels: Data_left = ft_selectdata(Data, 'channel', chan_left); Data = label: {31x1 cell} time: [1x350 double] individual: [30x31x350 double] dimord: 'subj_chan_time' cfg: [1x1 struct] The problem occurs because in ft_selectdata (3319) at line 70 the 'subj_' in the dimord field is replaced by 'rpt_'. However, in the function dimlength.m (2885) the field 'individual' is not defined for case 'rpt_' at line 107. Only for case 'subj_' at line 159: if isfield(data, 'individual'), n = [n size(data.individual, 1)]; end If I add the above line to the case 'rpt_' at line 107 the problem is solved.

Jan-Mathijs Schoffelen - 2011-04-19 11:27:56 +0200

*** Bug 583 has been marked as a duplicate of this bug. ***

Jan-Mathijs Schoffelen - 2011-04-19 11:28:44 +0200

OK. Thanks for the diagnostics and proposed fix. I implemented it and it will be available on the ftp-server tonight.