mean of elements of a matrix

1 visualización (últimos 30 días)
alpedhuez
alpedhuez el 31 de Mzo. de 2018
Respondida: Image Analyst el 20 de En. de 2023
I have a matrix A. I want to take an average of all elements of A. Please advise.

Respuesta aceptada

David Fletcher
David Fletcher el 31 de Mzo. de 2018
mean(A(:))
Gives the mean of the entire matrix

Más respuestas (2)

Rana Hamza
Rana Hamza el 20 de En. de 2023
Take average as the mean of whole matrix

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

Categorías

Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by