Back to the main page.

Bug 2896 - ft_selectdata does not extract selected frequencies

Status CLOSED FIXED
Reported 2015-05-13 09:07:00 +0200
Modified 2015-07-15 13:19:56 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 normal
Assigned to: Jim Herring
URL:
Tags:
Depends on:
Blocks:
See also:

Jim Herring - 2015-05-13 09:07:13 +0200

Related to the dashboard e-mail of May 11th there were a number of functions failing. Among others, test_ft_selectdata was failing because ft_selectdata did not correctly extract a requested range of frequencies. I traced the problem to a change made three days ago to increase robustness (irony?) of singleton dimension data in getdimord. Unfortunately there seemed to be a typo in the updated code: function ok = check_trailingdimsunitlength(data, dimtok) 562 563 ok = false; 564 for k = 1:numel(dimtok) 565 switch dimtok{k} 566 case 'chan' >> 567 ok = numel(data.label==1); 568 otherwise >> 569 ok = numel(data.(dimtok{k})==1); 570 end 571 if ok, 572 break; 573 end 574 end In lines 567 and 569 the numel was not compared to 1 but it basically just returned the numel of the field.


Jim Herring - 2015-05-13 09:08:34 +0200

Sending utilities/private/getdimord.m Transmitting file data . Committed revision 10402.


Jan-Mathijs Schoffelen - 2015-07-02 09:25:16 +0200

@Jim, has this now been fixed? If so, please change the status of this bug.


Jim Herring - 2015-07-08 13:18:20 +0200

Indeed fixed