title: Find mean of non-zero elements
body: <p>I am assuming that the <code>mean</code> fucntion takes a matrix and calculate its mean by suming all element of the array, and divide it by the total number of element. </p>
  
  <p>However, I am using this functionality to calculate the mean of my matrix. Then I come across a point where I don't want the mean function to consider the 0 elements of my matrix.  Specifically, my matrix is 1x100000 array, and that maybe 1/3 to 1/2 of its element is all 0. If that is the case, can I replace the 0 element with <code>NULL</code> so that the matlab wouldn't consider them in calculating the mean? What else can I do?</p>