saving all figures as jpeg file on harddrive

2 ビュー (過去 30 日間)
AA
AA 2018 年 4 月 23 日
編集済み: Benjamin Großmann 2018 年 4 月 23 日
Hi, i got a loop and it creates many figures (figure 1, figure 2 and so on). I want to save all as jpeg file on my harddrive. Any ideas?

採用された回答

Benjamin Großmann
Benjamin Großmann 2018 年 4 月 23 日
編集済み: Benjamin Großmann 2018 年 4 月 23 日
Collect all the figure handles in a figure handle array, e.g. f(ii) = figure; and then work with arrayfun on the saveas command.
MWE:
clearvars, close all, clc
for ii = 1:10
f(ii) = figure('name',sprintf('fig_%.2d',ii));
plot(rand(5,1),rand(5,1))
end
arrayfun(@(x) saveas(x,x.Name,'jpeg'),f)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by