mean of elements of a matrix

1 Ansicht (letzte 30 Tage)
alpedhuez
alpedhuez am 31 Mär. 2018
Beantwortet: Image Analyst am 20 Jan. 2023
I have a matrix A. I want to take an average of all elements of A. Please advise.

Akzeptierte Antwort

David Fletcher
David Fletcher am 31 Mär. 2018
mean(A(:))
Gives the mean of the entire matrix

Weitere Antworten (2)

Rana Hamza
Rana Hamza am 20 Jan. 2023
Take average as the mean of whole matrix

Image Analyst
Image Analyst am 20 Jan. 2023
theAverage = mean(A, 'all')
% or
theAverage = mean2(A) % In the Image Processing Toolbox.

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by