Calculating a mean matrix of a cell array
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
その他の回答 (1 件)
Paul
2023 年 7 月 10 日
Try
mean(cat(3,A{:}),3,'omitnan')
The omitnan flag will ignor the nan entries in the computation of the mean.
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!