Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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 vue (au cours des 30 derniers jours)
Stephen Nagy
Stephen Nagy le 11 Mar 2017
Clôturé : MATLAB Answer Bot le 20 Août 2021
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?
  1 commentaire
Stephen23
Stephen23 le 11 Mar 2017
What is "a row-wise sum of each size" ?
Do you wish to sum each matrix along columns or rows?

Réponses (0)

Cette question est clôturée.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by