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 ?
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 Exchange에서 Printing 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