Back to the main page.

Bug 3151 - round(true) fails on R2014b

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

and probably older versions. This was detected using test_ft_plot_matrix, which runs fine on 2015a, but errors on 2014b. The problem is that it is a builtin and adding a replacement function results in Warning: Function round has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict. > In path at 109 In addpath at 86 In ft_hastoolbox>myaddpath at 479 In ft_hastoolbox at 393 In ft_defaults at 174


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

as it is difficult to replace the "round" function, I'll solve it in the code giving the error: ------- Undefined function 'round' for input arguments of type 'logical'. Error in ft_plot_matrix (line 231) satmask = round(highlight); % enforce binary white-masking, the hsv approach cannot be used for 'white-shading' ------- Apparently here it assumes that highlight is not always a boolean. I have changed it into round(double(highlight))


Robert Oostenveld - 2016-06-22 13:13:11 +0200

roboos@mentat001> git commit plotting/ft_plot_matrix.m [master bc8345b] FIX - for R2014b, don't try to round a boolean number. See http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3151 1 file changed, 2 insertions(+), 2 deletions(-)


Robert Oostenveld - 2016-06-22 13:16:26 +0200

(In reply to Robert Oostenveld from comment #2) the same fix was needed in ft_plot_topo


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

closed multiple bugs that were resolved some time ago