mean of elements of a matrix

1 回表示 (過去 30 日間)
alpedhuez
alpedhuez 2018 年 3 月 31 日
回答済み: Image Analyst 2023 年 1 月 20 日
I have a matrix A. I want to take an average of all elements of A. Please advise.

採用された回答

David Fletcher
David Fletcher 2018 年 3 月 31 日
mean(A(:))
Gives the mean of the entire matrix

その他の回答 (2 件)

Rana Hamza
Rana Hamza 2023 年 1 月 20 日
Take average as the mean of whole matrix

Image Analyst
Image Analyst 2023 年 1 月 20 日
theAverage = mean(A, 'all')
% or
theAverage = mean2(A) % In the Image Processing Toolbox.

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by