Back to the main page.

Bug 235 - bsxfun is not supported on matlab71

Reported 2010-11-24 10:10:00 +0100
Modified 2010-12-03 11:38:08 +0100
Product: FieldTrip
Component: preproc
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
Depends on:
See also:

Robert Oostenveld - 2010-11-24 10:10:21 +0100

>> ft_realtime_signalviewer(cfg) processing segment 1 from sample 459424 to 460023 ??? Undefined command/function 'bsxfun'. Error in ==> ft_preproc_baselinecorrect at 62 dat = bsxfun(@minus,dat,baseline); Error in ==> preproc_baselinecorrect at 17 [varargout{1:nargout}] = funhandle(varargin{:}); Error in ==> ft_realtime_signalviewer at 147 data.trial{1} = preproc_baselinecorrect(data.trial{1}); The use of bsxfun in baselinecorerction is just for speed purposes and can be avoided. It should be made conditional on the matlab version. also todo: search the rest of fieldtrip for "bsxfun"

Robert Oostenveld - 2010-12-01 16:25:24 +0100

should be "grepped" to ensure that it is not used anywhere.

Jan-Mathijs Schoffelen - 2010-12-03 10:04:07 +0100

I made the use of bsxfun conditional on whether it exists or not, in ft_preproc_baselinecorrect. The other occurrences I could find are -ft_denoise_pca, which is my responsibility, and at present it checks for the existence of bsxfun and throws an error if it does not exist. -a few functions in the multivariate module. I leave it up to Marcel what to do with that, OK?

Robert Oostenveld - 2010-12-03 11:35:19 +0100

agreed. the multivariate toolbox does not run on old matlabs anyway, so there it does not have to be fixed.