MATLAB Answers

How to save automatic a plot via command?

1 view (last 30 days)
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..

  0 Comments

Sign in to comment.

Accepted Answer

KALYAN ACHARJYA
KALYAN ACHARJYA on 25 Oct 2019
Edited: KALYAN ACHARJYA on 25 Oct 2019
%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

More Answers (0)

Sign in to answer this question.