Is there a command in MATLAB which allows saving a figure in FIG or JPEG or both formats automatically?
If you want to save it as .fig file, hgsave is the function in Matlab R2012a. In later versions, savefig may also work.