假设A是长*宽*高,即x*y*z的三维数组,我想对某一高上求平面上所有点的平均
我目前的方法是多次求平均
B= squeeze(nanmean(nanmean(A,1),2));
请问有什么直接办法可以对多维数组除开某一维求平均吗?

 採用された回答

0 投票

nanmean(A,[1 2])

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!