I have a number of sparse matrices, that I want to sum up. These are

composed in a for loop, and summing them up leeds to memory allocation

and reordering in every step of the loop. Very ugly and slow. So a

fellow came up with the idea of putting these matrices in columns of

large sparse matrix and do a

sum(M,2).

This leeds to a out of memory error. A

sum(M)

works fine. So I assume, Matlab does the summing along rows on

full(M),

wich is easier to implement, but not of that much use, as in the above

stated example, one dimension is some 10 million.

Yes, you read right, it is very sparse.

Transposing M seems to be done on full(M) as well.

I tried to do the sum on every row at a time, but even on row is too

large (otherwise the original matrices wouldn't have to be sparse ;-))

I ended up with doing the sum by hand, but a for loop over every

nonezero of the final matrix is REALLY slow.

Any good workaround?

(to Mathworks: if it isn't yet, would you copy these 'features' from my

wishlist to yours? Thanx)

Axel