how save plot in specific folder ?
61 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
i uesd ( spectrogram ) to plot pic i need save this pic in specific folder i created i use ( exportgraphics ) but is save in current folder how can save with any folder whant
0 commentaires
Réponse acceptée
Jan
le 10 Mar 2021
Add the wanted path to the file name:
filename = fullfile('D:\Your\Folder', 'File.jpg')
exportgraphics(obj, filename)
3 commentaires
Jan
le 11 Mar 2021
Folder = 'D:\Your\Folder';
for k = 1:100
filename = sprintf('File%03d.jpg', k);
file = fullfile(Folder, filename);
exportgraphics(obj, file);
end
Plus de réponses (1)
Ruger28
le 10 Mar 2021
In older versions of MATLAB:
filename = fullfile('D:\Your\Folder', 'File.jpg');
saveas(MyFigure,filename);
Voir également
Catégories
En savoir plus sur Printing and Saving 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!