Export axes error using app designer

Hi all,
I am trying to export many axes using a loop, but I recieve the following error for the coding below: "First parameter must specify the axes or chart object". What am i doing incorrect? Thanks!
for i = 1:10
for ii = 1:5
CurrentAxes = append('app.UIAxes',(append(num2str(i),'_',num2str(ii))));
exportgraphics(CurrentAxes,'FileName.jpg'))))
end
end

回答 (1 件)

LO
LO 2021 年 7 月 9 日

0 投票

have you tried using for each iteration
saveas(gca,'figure.jpg')
you would have to change the file name each time by adding a string with i and ii in the figure name.
filename = ['figure_',num2str(i),'_',num2str(ii),'.jpg'];
saveas(gca,filename)
Would this work ?

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

質問済み:

2021 年 7 月 9 日

回答済み:

LO
2021 年 7 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by