Back to the main page.

Bug 2709 - config/subsref results in: Non-overloaded subscripting can produce only one result

Status CLOSED FIXED
Reported 2014-09-28 12:20:00 +0200
Modified 2015-02-11 10:39:59 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2014-09-28 12:20:56 +0200

Using this section in the natmeg dipole fitting hands-on cfg = []; cfg.dataset = dataset; cfg.trialdef.prestim = 0.2; cfg.trialdef.poststim = 0.4; cfg.trialdef.rsp_triggers = [256 4096]; cfg.trialdef.stim_triggers = [1 2]; cfg.trialfun = 'trialfun_oddball_stimlocked'; cfg = ft_definetrial(cfg); cfg.continuous = 'yes'; cfg.hpfilter = 'no'; cfg.detrend = 'no'; cfg.demean = 'yes'; cfg.baselinewindow = [-inf 0]; cfg.dftfilter = 'yes'; cfg.dftfreq = [50 100]; cfg.lpfilter = 'yes'; cfg.lpfreq = 120; cfg.channel = 'EEG'; cfg.precision = 'single'; data_eeg = ft_preprocessing(cfg); --- I get this error Error using subsref Non-overloaded subscripting can produce only one result. Error in config/subsref (line 66) [varargout{:}] = subsref(subsref(x, index(1)), index(2:end)); Error in ft_preprocessing (line 526) nsamples = cfg.trl(i,2)-cfg.trl(i,1)+1; ---- The workaround is not to use configuration tracking, but it should be fixed nevertheless.


Robert Oostenveld - 2014-10-19 09:48:09 +0200

I also encountered it in test_bug1646, where it was triggered by calling cfg.tissue{1}. This solves it roboos@mentat001> svn commit @config/subsref.m Sending @config/subsref.m Transmitting file data . Committed revision 9917. However, I noticed that a(1).b = 1 a(2).b = 1:2 a(3).b = 1:3 a = config(a); {a.b} % works ans = [1] [1x2 double] [1x3 double] {a(:).b} % fails without error ans = [1] I will add this test case to the test_config script.


Robert Oostenveld - 2015-02-11 10:39:59 +0100

Closed several bugs that were recently resolved. Please reopen if you are not happy with the resolution.