how can I use mean for cell arrays within cell
Afficher commentaires plus anciens
Dear users,
I want to calculate the annual average of the attached file from the data in the cell array, regardless of the NaNs values.
Thanks in advance,
Réponses (1)
Bhaskar R
le 25 Fév 2020
result = cellfun(@(x)mean(x, 'omitnan'), [T_mon{:}])
Catégories
En savoir plus sur Resizing and Reshaping Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!