title: Summing across rows of a matrix instead of columns
body: <p>I have a 21x19 matrix <code>B</code></p>
  
  <p>Each index of the matrix is either 1,0, or -1. I want to count the number of occurrences for each row and column.  Performing the column count is easy:</p>
  
  <pre><code>Colcount = sum( B == -1 );
  Colcount = sum( B == 0  );
  Colcount = sum( B == 1  );
  </code></pre>
  
  <p>However accessing the other dimension to attain the row counts is proving difficult. It would be great of it could be accessed in one statement. 
  Then i need to use a fprintf statement to print the results to the screen.</p>