save multiple gui window in appdesigner

Hi,
I am using appdesigner, In the callback of "RUN" button I have called one .m file which is executing perfectly and it creates multiple graphs in different pop up windows.
I want to use "SAVE" button to save all the multiple popup windows in user specified path.
Any help is appreciated. Thanks

답변 (1개)

Adam Danz
Adam Danz 2021년 7월 28일

0 개 추천

  1. In the m-file, before creating the first figure, store a list of pre-existing figures. Hint: findobj(0,'type','figure')
  2. After creating the last figure, create a second list of all existing figures.
  3. Compare the two vectors of figure handles using ismember to get a list of all new figures generated while running the m-file.
  4. Use uigetdir to allow the user to select a directory, then loop through each figure and saveas().

댓글 수: 2

Harish M Y
Harish M Y 2021년 7월 29일
Thanks for the input. Let me try the same
Adam Danz
Adam Danz 2021년 7월 29일
편집: Adam Danz 2021년 8월 3일
If you get stuck, share the relevant code in a comment and describe the problem so we can help you get un-stuck. Good luck.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Desktop에 대해 자세히 알아보기

질문:

2021년 7월 28일

편집:

2021년 8월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by