title: Histogram on elements of a 2D matrix in Matlab
body: <p>I am wondering if there is any build in function or an easy way to plot a histogram of elements of a <code>2d array</code>.</p>
  
  <p>For example, if <code>A=rand(100,1)</code>, then <code>A</code> is an <code>1D array</code>, and <code>hist(A)</code> can do the histogram.</p>
  
  <p>However, what if <code>A=rand(100,100)</code>, and I would like to make a histogram on elements of <code>A</code>, just like treating each element in <code>A</code> as an element on a <code>1D array</code>. Is there a easy way to do so?</p>