How to save automatic a plot via command?

14 次查看(过去 30 天)
Hello,
Doew anybody knows How to save automatic a plot in matlab via command after running the code? I hve used command like saveas but the images does not exist..

采纳的回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019-10-25
编辑:KALYAN ACHARJYA 2019-10-25
%Generate_figure
saveas(gcf,'file_name.png');
The figure will save as png image format in the same working directory
For multiple figures:
for i=1:n
saveas(gcf,sprintf('%d.jpg',j));
end

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by