Calculating a mean matrix of a cell array
    3 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
Hi, 
I have a   A=78757x1 cell, consiting of {125×15 double} matrices. 
How can I calculate the mean of all (78757)  matrixes, ( "element-by-element" for each matrix) so that I have a mean Matrix of 125*15 at the end. A contains also sometimes NaN entries.
Thanks,
Chris
0 commentaires
Réponse acceptée
Plus de réponses (1)
  Paul
      
      
 le 10 Juil 2023
        Try
mean(cat(3,A{:}),3,'omitnan')
The omitnan flag will ignor the nan entries in the computation of the mean.
Voir également
Catégories
				En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!