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 CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by