BUG DESCRIPTION:
----------------
The addition of the sparse matrices
sparse([3,4],9) + sparse([1,2],5)
should be equal to
sparse([3,4;1,2],[9;5])
but the results are strange with some indices and values apparently due to accessing "random" memory.
The problem appears when indices of one matrix are outside the bounds of the other.
The addition of sparse([3,4],9, [99,99]) + sparse([1,2],5, [99,99]) works correctly.
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
-------------------------
--> sparse([3,4],9)+sparse([1,2],5)
ans =
( 1, 2) sparse matrix
( 1, 2) 5.
--> sparse([1,2],5)+sparse([3,4],9)
ans =
( 3, 4) sparse matrix
( 1, 2) 5.
( 2, 1) -3.79D-270
( 2, 2008469625) Inf
( 3, 4) 9.
OTHER INFORMATION:
------------------