Save/Convert large number of figures

3 ビュー (過去 30 日間)
Ansh
Ansh 2019 年 2 月 19 日
コメント済み: Ansh 2019 年 4 月 2 日
So I have large number of .fig in a certain file directory. I'd like to save/convert all of them to .eps (I need high quality plots for publication). Is there anyway to do this without having to manually open every single .fig file and save it to a file with the same name but in .eps format? Preferably all the .eps files will be saved in a new folder called 'eps'.
Thanks a lot for your help guys!

採用された回答

Sajeer Modavan
Sajeer Modavan 2019 年 3 月 20 日
clc;clear;close all
%% creating fig files (this not required for you)
for ii = 1:10
fig1m = figure;
plot(1:100,randi([0 100],100,1))
saveas(fig1m,['Figure_' num2str(ii) '.fig'])
close all
end
%% Opening existing fig files and save to eps file (This is what you need)
for ii = 1:10
fig_i = open(['Figure_' num2str(ii) '.fig']);
saveas(fig_i,['Figure_' num2str(ii) '.eps'],'epsc')
close all
end
  2 件のコメント
Sajeer Modavan
Sajeer Modavan 2019 年 3 月 24 日
Do you need any further help, accept the answer and close this issue if you don't need any further help.
Ansh
Ansh 2019 年 4 月 2 日
Thanks for your help, I created my own solution which was basically this anyway. I have now accepted your answer.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnimation についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by