How can I mean multiple matrices, element by element in a n*n cell array?

1 Ansicht (letzte 30 Tage)
WeChat Screenshot_20190421200025.png
I've got a data looks like this. size(16*6) cell array. I want to get the average of each columns, but keep the size of each matrice(650*1).

Akzeptierte Antwort

Matt J
Matt J am 21 Apr. 2019
Bearbeitet: Matt J am 21 Apr. 2019
If I call your cell array C,
M=cell2mat(reshape(C,1,16,[]));
result = mean(M,2)

Weitere Antworten (0)

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by