Back to the main page.

Bug 3153 - ft_statfun_pooledT fails on 2015b (Field assignment to a non-structure array object), works on 2015a

Status CLOSED FIXED
Reported 2016-06-22 13:26:00 +0200
Modified 2017-01-17 11:29:41 +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 - 2016-06-22 13:26:08 +0200

This was detected in a test script. ------------------------------------------------ Field assignment to a non-structure array object. Error in ft_statfun_pooledT (line 76) s.stat = s; Error in ft_statistics_montecarlo (line 267) [statobs, cfg] = statfun(cfg, dat, design); Error in ft_freqstatistics (line 193) [stat, cfg] = statmethod(cfg, dat, design); Error in test_bug798 (line 46) stat = ft_freqstatistics(cfg,t2_subj1,t2_subj2,t2_subj1_null,t2_subj2_null);


Robert Oostenveld - 2016-06-22 13:29:28 +0200

this is simply like s = 1 s.stat = s; at the end of the statfun. I remember that a particular matlab version got strict about this, but that later matlab versions relaxed it again.


Robert Oostenveld - 2016-06-22 13:29:52 +0200

I suspect multiple of the older statfuns to have this pattern. It can easily be fixed.


Robert Oostenveld - 2016-06-22 13:34:43 +0200

(In reply to Robert Oostenveld from comment #1) I am actually not sure about the "later versions". Better forget that.


Robert Oostenveld - 2016-06-22 13:35:41 +0200

roboos@mentat001> git commit -a [master 57a863f] ENH - improve compatibility with 2015b and prevent "Field assignment to a non-structure array object". See http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3153 6 files changed, 12 insertions(+), 12 deletions(-)


Robert Oostenveld - 2017-01-17 11:29:41 +0100

closed multiple bugs that were resolved some time ago