Mean matrix of different size matrices in one cell array

1 visualizzazione (ultimi 30 giorni)
Hi, everybody!
I have different size 3D matrices in 1x5 cell array, like this :
A = {{9×119×11},{6×119×11},{8×119×11},{9×119×11},{7×119×11}}
How to find one mean matrix across all matrices?
Thanks so much in advance for your help!
  3 Commenti
IM
IM il 13 Set 2019
Expected output must be only one 3D matrix ,like this : X×119×11.
Stephen23
Stephen23 il 13 Set 2019
"Expected output must be only one 3D matrix ,like this : X×119×11"
And what is X for your given example?

Accedi per commentare.

Risposta accettata

Stephen23
Stephen23 il 13 Set 2019
Modificato: Stephen23 il 13 Set 2019
C = cellfun(@(m)mean(m,1),A, 'uni',0);
B = cat(1,C{:})

Più risposte (1)

Matt J
Matt J il 13 Set 2019
Modificato: Matt J il 13 Set 2019
cellfun( @(a)mean(a(:)) , A)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by