how save plot in specific folder ?

237 ビュー (過去 30 日間)
Muhannad Saleh
Muhannad Saleh 2021 年 3 月 10 日
コメント済み: Jan 2021 年 3 月 11 日
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

採用された回答

Jan
Jan 2021 年 3 月 10 日
Add the wanted path to the file name:
filename = fullfile('D:\Your\Folder', 'File.jpg')
exportgraphics(obj, filename)
  3 件のコメント
Muhannad Saleh
Muhannad Saleh 2021 年 3 月 11 日
how can save more pic in loop with difrient name ?
Jan
Jan 2021 年 3 月 11 日
Folder = 'D:\Your\Folder';
for k = 1:100
filename = sprintf('File%03d.jpg', k);
file = fullfile(Folder, filename);
exportgraphics(obj, file);
end

サインインしてコメントする。

その他の回答 (1 件)

Ruger28
Ruger28 2021 年 3 月 10 日
In older versions of MATLAB:
filename = fullfile('D:\Your\Folder', 'File.jpg');
saveas(MyFigure,filename);
  1 件のコメント
Muhannad Saleh
Muhannad Saleh 2021 年 3 月 11 日
how can save more pic in loop with difrient name ?

サインインしてコメントする。

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by