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

2 vues (au cours des 30 derniers jours)
i have to take mean value for each element of the matrix of an image how can i do that

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by