对多维数组除开某一维求平均。

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

 Risposta accettata

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!