i have to take mean value for each element of the matrix of an image how can i do that

1 view (last 30 days)
i have to take mean value for each element of the matrix of an image how can i do that

Accepted Answer

Walter Roberson
Walter Roberson on 19 Oct 2012
mean(TheMatrix(:))
  1 Comment
Matt J
Matt J on 19 Oct 2012
Edited: Matt J on 19 Oct 2012
For large non-double arrays, this is more robust against overflow:
meanval=sum(A(:),'double')/numel(A);

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!