Back to the main page.

Bug 1232 - ft_selectdata cannot select trials from a source structure

Reported 2011-12-13 20:26:00 +0100
Modified 2019-08-10 12:28:47 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Arjen Stolk
Depends on:
Blocks: 1021
See also:

Arjen Stolk - 2011-12-13 20:26:25 +0100

Basically, when trying to select a subset of trials in a source structure. subset = ft_selectdata(source, 'rpt', [1:100]) for example is problematic when trying to reshaping in 'seloverdim', error: To RESHAPE the number of elements must not change, line 102 tmp{j} = reshape(tmp{j},reduceddim{i})

Boris Reuderink - 2012-01-03 11:32:20 +0100

I am lacking to knowledge to understand this issue. Arjen, could you give a specific example (code?) that demonstrates what should happen, and what happens instead?

Boris Reuderink - 2012-01-19 11:54:18 +0100

Arjen, this bug is still unconfirmed. Could you provide some additional information?

Boris Reuderink - 2012-02-01 13:45:24 +0100

During bug-binge, JMS explained that it is related to the general refactoring of ft_selectdata. I have made it blocking on 1021, and change the status back to NEW (confirmed).

Arjen Stolk - 2013-01-15 21:01:41 +0100

Hey cap/JM, Is ft_selectdata still under construction?

Jan-Mathijs Schoffelen - 2013-01-16 14:19:06 +0100

Yes, it is.

Jan-Mathijs Schoffelen - 2013-10-26 18:19:55 +0200

Note to self: this functionality is not in ft_selectdata_old/_new. It does not make too much sense to implement it in ft_selectdata_old, I think. Order of things: -deprecate ft_selectdata_old -implement it in ft_selectdata_new. In other words, this one has to wait a bit.

Arjen Stolk - 2014-02-03 10:42:17 +0100

What's up?

Jan-Mathijs Schoffelen - 2014-02-03 10:43:17 +0100

feel free to make an implementation

Arjen Stolk - 2014-02-03 13:40:33 +0100

so this functionality is yet not miraculously being supported by ft_selectdata_new?

Robert Oostenveld - 2014-04-14 13:52:25 +0200

I implemented a test script for a source structure with pow as numeric array and as cell-array. With the upcoming format of the source representation and ft_selectdata_newer it now works. mac011> svn commit Adding test/test_bug1232.m Sending utilities/ft_datatype_source.m Sending utilities/ft_selectdata_newer.m Sending utilities/private/getdimord.m Sending utilities/private/getdimsiz.m Transmitting file data ..... Committed revision 9404.

Arjen Stolk - 2014-04-14 16:58:58 +0200


Robert Oostenveld - 2019-08-10 12:28:47 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on