title: How do I display the red channel of an image in Matlab?
body: <p>I have a 3D matrix <code>im</code> which represents an RGB image. I can do</p>
  
  <pre><code>imshow(im)
  </code></pre>
  
  <p>to display the image. </p>
  
  <p>I want to display only one of the RGB channels at a time: I want to display the red channel and I want it to appear red.</p>
  
  <p>I've tried</p>
  
  <pre><code>imshow(im(:,:,1))
  </code></pre>
  
  <p>but it displays the grayscale image (which is not what I want).</p>
  
  <p>How do I display the red channel and make it appear red?</p>