diag(spzeros(2,2)) gives "Warning adding a matrix with empty matrix will give an empty matrix result"
Reported by Gerrit C. Groenenboom
BUG DESCRIPTION:
----------------
Taking the diagonal of a sparse matrix of dimension larger than 1 gives warning.
ERROR LOG:
----------
--> diag(spzeros(2,2))
operation -: Warning adding a matrix with the empty matrix will give an empty matrix result.
operation -: Warning adding a matrix with the empty matrix will give an empty matrix result.
ans =
( 2, 1)zero sparse matrix
HOW TO REPRODUCE THE BUG:
-------------------------
diag(spzeros(2,2))
OTHER INFORMATION:
------------------
Same problem in version 6.0.1
Scilab prior to version 6 did not have this problem