Back to the main page.

Bug 2363 - ft_selectdata_new fails on chan_freq data (and possibly other?) when selecting channels

Status CLOSED FIXED
Reported 2013-11-05 11:39:00 +0100
Modified 2014-01-29 13:28:44 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Eelke Spaak
URL:
Tags:
Depends on:
Blocks: 1021
See also:

Eelke Spaak - 2013-11-05 11:39:46 +0100

will make test script


Eelke Spaak - 2013-11-05 12:00:47 +0100

bash-4.1$ svn commit test Adding test/test_bug2363.m Transmitting file data . Committed revision 8717. The problem seems to occur when data.label is a column vector and cfg.channel is a row vector.


Eelke Spaak - 2013-11-05 12:01:26 +0100

(In reply to comment #1) cfg.channel does not matter, when data.label is a column the bug occurs.


Eelke Spaak - 2013-11-05 12:09:21 +0100

The problem is caused because when all(size(data.label) == size(data.powspctrm)) the label field is added to 'datfields' and thus the makeselection() subfunction will perform the selection in the label field, causing the subsequent makeselection_chan() subfunction to fail (index out of bounds). Proposed solution: explicitly exclude .label, .time, and .freq fields from being added to datfields. This seems to me a more robust solution (given the current code) than allowing the selection in these descriptive fields being made by makeselection() already.


Eelke Spaak - 2013-11-05 12:20:29 +0100

fixed in 8719


Eelke Spaak - 2014-01-29 13:28:44 +0100

changing lots of bugs from resolved to closed.