Saving an image in multiple formats without it appearing is not possible, but the "print" command can be used for this purpose. Check out the solution provided in this post: How tosave an imagesc output in matlab. Matlab - How to save the plotted figure automatically, Try this one. Use ...