title: Save an imagesc output in Matlab
body: <p>I am using imagesc to get an integral image. However, I only manage to display it and then I have to save it by hand, I can't find a way to save the image from the script with imwrite or imsave. Is it possible at all?</p>
  
  <p>The code:</p>
  
  <pre><code>image='C:\image.jpg';
  in1= imread((image));
  in=rgb2gray(in1);
  in_in= cumsum(cumsum(double(in)), 2);
  figure, imagesc(in_in); 
  </code></pre>