フィルターのクリア

Mean of 2 arrays

30 ビュー (過去 30 日間)
alex
alex 2013 年 5 月 15 日
Hi, I have 2 arrays in a cell:
imag =
[1130x2120 double] [1130x2120 double]
How can i calculate the mean of both arrays together not of each one?

回答 (2 件)

John Doe
John Doe 2013 年 5 月 15 日
編集済み: John Doe 2013 年 5 月 15 日
One way would be:
mean(mean([imag{1} imag{2}]))
If the dimensions don't match:
mean([imag{1}(:); imag{2}(:)])

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 5 月 15 日
cellfun(@(x) mean(x(:)),imag)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by