Circshift bug for sparse logical.

1 view (last 30 days)
Jan Orwat
Jan Orwat on 8 Dec 2015
Commented: Ray L on 18 Feb 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.

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!