Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible bug in `toc` function in Matlab R2015b

Tags:

time

matlab

Usually calling a Matlab function with an empty comma-separated list is the same as calling it without arguments. For example,

in={}; spy(in{:});

is the same as

spy %// call without inputs

However, I'm getting strange behviour for the 1-output version of toc: this works as expected

tic; t=toc

whereas this crashes (closes Matlab) in R2015b, Windows 7 64 bits:

tic; in={}; t=toc(in{:})

It works properly in Matlab R2014b, Windows 7 64 bits.

Can someone reproduce this behaviour in R2015b? Any explanation? Possible bug?

like image 254
Luis Mendo Avatar asked Dec 08 '15 17:12

Luis Mendo


1 Answers

Just to close this question:

From the comments above, this problem happens in Matlab R2015b in various operating systems. It doesn't happen in older Matlab versions.

I reported a bug to Mathworks. They told me be the developers are aware of this issue and it will be fixed for R2016b.

EDIT (October 3, 2016): I confirm that the bug has been corrected in R2016b.

like image 89
Luis Mendo Avatar answered Oct 09 '22 23:10

Luis Mendo