Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个一维数组,我需要计算它的平均值。
我试过:
A = mean(mean(PSNRarr,2),2)
但我得到一个错误。
如果有人知道如何使它工作,那就太好了!
适用于任意数量维度的最简单方法(假设它是常规矩阵):
mean(PSNRarr(:))
但是,如果您有一个带有数字的元胞数组,请尝试:
mean(mean(cell2mat(PSNRarr)))
尝试
mean(mean(PSNRarr))
更多字符来克服 SO minimum。