title: Dividing a range into bins in matlab
body: <p>I have the following range from a much larger matrix : </p>
  
  <p>range(a)</p>
  
  <p>ans =</p>
  
  <pre><code>94   153   144    59    79    90   131    64
  </code></pre>
  
  <p>My professor is asking us to:  Divide the range into N = 10 equal-length segments (hereafter called “bins”), and for each bin, find its bounds (aj, bj) as well as its center cj.</p>
  
  <p>(5) Place each measured bacterial count xi into that bin whose lower bound is less than or equal to xi and whose upper bound is greater than xi; thereafter, for each bin count the number of xi assigned to it (= nj).</p>
  
  <p>(6) Plot a histogram of the measured bacterial counts using N = 10 bars.
  Try the MATLAB functions hist(x,N) and bar(c, n)</p>
  
  <p>I know this is a lot, but I have absolutely no instruction from this guy and would really appreciate a helping hand :) </p>