Info

此问题已关闭。 请重新打开它进行编辑或回答。

I have a cell matrix with arrays. Each row has a certain size matrix. I would like to add the matrices along the rows

1 次查看(过去 30 天)
Given r={rand(3), rand(3);rand(2),rand(2)}, I want to get a row-wise sum of each size. cellfun and @sum lets you add arrays like that but seemingly, not matrices.
Is there a vectorized solution?
Also --- is it possible that sparse matrices make the operation slower?

回答(0 个)

此问题已关闭。

产品

Community Treasure Hunt

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

Start Hunting!

Translated by