Is there a way of creating a code so every time you save a figure as .mat it automatically also saves it as .bmp?

1 visualización (últimos 30 días)
I am running various code, and I dont want to save the figure every time (hence I don't want to incorporate it into my functions or codes)
I was just wondering if there was a way of setting matlab up so that every time i save a file as .mat manually in the figure window - that it also saves the figure simultaniouly in another format (fx .bmp)
currently I have to go in manually and save the file twice which is time consuming.

Respuestas (1)

Cris LaPierre
Cris LaPierre el 20 de Abr. de 2019
There is code you can add to your script/function so that once a figure has been created, it will save it.
This is done with the print command. Use the formattype argument to specify the file format to create. There are a couple of bmp options shown in the table here.
See this example for saving a barplot as a png. Additional examples follow it.

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Productos


Versión

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by