title: How to make normalized frequency distribution plot for 2D matrices?
body: <p>I have two 80*80 matrices. I would like to plot normalized frequency plot. I tried to normalize the 80* 80 grid with the following code:</p>
  
  <pre><code>A = per_monsoon_postmon; % (A is my 80*80 matrix)
  A = rand (80,80);
  minA = repmat(min(A), [size(A, 1), 1]);
  normA = max(A) - min(A);
  normA = repmat(normA, [length(normA) 1]);
  
  normalizedA = (A - minA)./normA;
  </code></pre>
  
  <p>But this code didn't give me the desired result, as grids with <code>nan</code> values also has a number in it. For eg. earlier grid 1*1 is <code>nan</code> now it has a value of 0.8340. Could you please help me how to normalize the 2D matrix and then plot frequency distribution plot in MATLAB? Is there a way to directly plot normalized frequency distribution plot?</p>