From: Bruno Luong on 6 Apr 2010 10:21 I have this piece of code that crashes my Matlab 2010a 64 bits, Vista. a=zeros(1,2e4); a(1000:1000:end)=NaN; a(logical(0./a)) = 0; With 2007a, it throw an error of the third statement "NaN's cannot be converted to logicals." Can someone else confirm so I can report to TMW as a bug? Admittedly this piece of code is strange, but the crashes indicates something is not right in the built-in basic library. Bruno
From: Oliver Woodford on 6 Apr 2010 10:43 "Bruno Luong" wrote: > I have this piece of code that crashes my Matlab 2010a 64 bits, Vista. > > a=zeros(1,2e4); > a(1000:1000:end)=NaN; > a(logical(0./a)) = 0; > > With 2007a, it throw an error of the third statement "NaN's cannot be converted to logicals." > > Can someone else confirm so I can report to TMW as a bug? > > Admittedly this piece of code is strange, but the crashes indicates something is not right in the built-in basic library. > > Bruno This also crashes my MATLAB 2010a on 32 bit Windows XP. Oliver
From: Jan Simon on 6 Apr 2010 11:05 Dear Bruno! > I have this piece of code that crashes my Matlab 2010a 64 bits, Vista. > > a=zeros(1,2e4); > a(1000:1000:end)=NaN; > a(logical(0./a)) = 0; > > With 2007a, it throw an error of the third statement "NaN's cannot be converted to logicals." > > Admittedly this piece of code is strange, but the crashes indicates something is not right in the built-in basic library. > > Bruno Perhaps the level of strangeness can be reduced? a = zeros(1, 5); a(logical([0, 1, NaN, 0 / 0, 0 / NaN])) = 0 or: b = 0; b(logical(0 / b)) = 0 I do not have 2010a to test this. In 2009a the expected error message "NaN's cannot be converted to logicals." appears, as you surely know already, Bruno. Thanks Bruno for finding this bug! Jan
From: Bruno Luong on 6 Apr 2010 11:19 "Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <hpfij0$91v$1(a)fred.mathworks.com>... > > Perhaps the level of strangeness can be reduced? > a = zeros(1, 5); > a(logical([0, 1, NaN, 0 / 0, 0 / NaN])) = 0 > or: > b = 0; > b(logical(0 / b)) = 0 Hi Jan and Olivier, Both of the above still work. The crash appears with larger size like in the original code. I have reported the bug. Thanks, Bruno
From: Matt J on 6 Apr 2010 11:32
"Oliver Woodford" <o.j.woodford.98(a)cantab.net> wrote in message <hpfh9q$i41$1(a)fred.mathworks.com>... > This also crashes my MATLAB 2010a on 32 bit Windows XP. ====== R2009b as well. |