i need this equation matlab code any body help me.

1 view (last 30 days)

Answers (1)

Jan
Jan on 15 Jan 2018
Edited: Jan on 15 Jan 2018
gbar = sum(g(:)) / (M * N);
sigma2 = sum((g(:) - gbar) .^ 2) / (M * N - 1);
Looks straight forward. But what about:
sigma2 = var(g(:))
  1 Comment
Image Analyst
Image Analyst on 15 Jan 2018
and
gBar = mean(g(:)) % Compute mean over all values in the 2-D matrix.

Sign in to comment.

Categories

Find more on Simulation, Tuning, and Visualization in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!