I generated some plots using this code, but couldn't not be able to save them in a specific folder. How can i save them in a specific folder?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mr. 206
le 24 Août 2018
Modifié(e) : Mr. 206
le 28 Août 2018
%Preparing for Plotting
%figure();
c = 0;
for j = 1: 2 : size(READ,2)
figure();
c = c+1;
plot(READ(:,j),READ(:,j+1),'k','LineWidth',5)
xlabel('1000/Temperature[1/K]') % x-axis label
ylabel('Ignition delay time (ms)') % y-axis label
end
end
2 commentaires
Réponse acceptée
Walter Roberson
le 24 Août 2018
For example,
savedir = fullfile(IGNfolder, 'figures');
figs = findobj(0, 'type', 'figure');
for K = 1 : length(figs)
thisfig = figs(K);
figno = double(thisfig);
filename = fullfile( savedir, sprintf('%g.png', figno) );
saveas(thisfig, filename);
end
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!