mean of elements of a matrix
1 view (last 30 days)
Show older comments
alpedhuez
on 31 Mar 2018
Answered: Image Analyst
on 20 Jan 2023
I have a matrix A. I want to take an average of all elements of A. Please advise.
0 Comments
Accepted Answer
More Answers (2)
Image Analyst
on 20 Jan 2023
theAverage = mean(A, 'all')
% or
theAverage = mean2(A) % In the Image Processing Toolbox.
0 Comments
See Also
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!