Mean matrix of different size matrices in one cell array

1 次查看(过去 30 天)
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 个评论
IM
IM 2019-9-13
Expected output must be only one 3D matrix ,like this : X×119×11.
Stephen23
Stephen23 2019-9-13
"Expected output must be only one 3D matrix ,like this : X×119×11"
And what is X for your given example?

请先登录,再进行评论。

采纳的回答

Stephen23
Stephen23 2019-9-13
编辑:Stephen23 2019-9-13
C = cellfun(@(m)mean(m,1),A, 'uni',0);
B = cat(1,C{:})

更多回答(1 个)

Matt J
Matt J 2019-9-13
编辑:Matt J 2019-9-13
cellfun( @(a)mean(a(:)) , A)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by