Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Wenyi Xiao
Wenyi Xiao le 21 Avr 2019
Modifié(e) : Matt J le 21 Avr 2019
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).

Réponse acceptée

Matt J
Matt J le 21 Avr 2019
Modifié(e) : Matt J le 21 Avr 2019
If I call your cell array C,
M=cell2mat(reshape(C,1,16,[]));
result = mean(M,2)

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by