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

 Accepted Answer

mean(TheMatrix(:))

1 Comment

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!