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 日

1 投票

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 月 10 日
thank you
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 日

3 投票

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 ?

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

カテゴリ

ヘルプ センター および File ExchangePrinting and Saving についてさらに検索

質問済み:

2021 年 3 月 10 日

コメント済み:

Jan
2021 年 3 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by