The following code
A = sparse(1:3, 1:3, 1:3)
B = sparse(4,4,4)
A+B
gives the error
Error using +
Matrix dimensions must agree.
because the matrices have different sizes:
why aren't sparse matrices zero padded to the highest dimension in order to naturally allow for operations such as A+B ?
In my (beginner) understanding, I don't see any difference in sparse(1:3, 1:3, 1:3), sparse(1:3, 1:3, 1:3, 4, 4) or sparse(1:3, 1:3, 1:3, 100, 100), but apparently they differ in sizes. Which details am I missing? Where do I find them in the documentation?