Circshift bug for sparse logical.

1 visualización (últimos 30 días)
Jan Orwat
Jan Orwat el 8 de Dic. de 2015
Comentada: Ray L el 18 de Feb. de 2018
Hello, does anybody know if it has been reported?
Circshift seems to shift sparse logicals properly, but changes trues to falses, which leads to several logical problems:
>> C = circshift(sparse(true),1)
C =
(1,1) 0
>> C == ~C
ans =
(1,1) 1
>> C&C
ans =
(1,1) 0
>> C|C
ans =
(1,1) 1
% etc.
It's not a major problem since sparse logicals doesn't seem to be in common use and workaround with indexing is very simple. Bug confirmed in 2015a and 2015b, denied in 2010b, 2013a and 2013b. It probably exists since last changes in circshift in 2014a.

Respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by