Borrar filtros
Borrar filtros

How to automatcly save a plot in matlab

3 visualizaciones (últimos 30 días)
khatereh
khatereh el 3 de Dic. de 2011
I have a loop that do plotting. Is there a way instead of manually saving the graph the plots automatically be saved?

Respuesta aceptada

Grzegorz Knor
Grzegorz Knor el 3 de Dic. de 2011
Simple example:
x = linspace(0,1,100);
for k=1:10
stem(x,x/k)
ylim([0 1])
filename = sprintf('pic%i',k);
print('-djpeg', filename, '-r100');
end

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by