title: How can I convert a color image to grayscale in MATLAB?
body: <p>I am trying to implement an algorithm in computer vision and I want to try it on a set of pictures.  The pictures are all in color, but I don't want to deal with that.  I want to convert them to grayscale which is enough for testing the algorithm.</p>
  
  <p>How can I convert a color image to grayscale?</p>
  
  <p>I'm reading it with:</p>
  
  <pre><code>x = imread('bla.jpg');
  </code></pre>
  
  <p>Is there any argument I can add to <code>imread</code> to read it as grayscale?  Is there any way I change <code>x</code> to grayscale <em>after</em> reading it?</p>