Save last figure position

Hi,
Is there a way to save the position property of the last active figure?
Regards, Adi
Edit: OK, Thank you for answering so quickly.

 채택된 답변

Jan
Jan 2011년 7월 6일

1 개 추천

What is "last"? The last one before closing the Matlab session? The position of a dialog before closing?
For the later you can define the CloseRequestFcn and DeletFcn such that "get(FigureHandle, 'Position')" is used to get the position and store it in the format you want.

추가 답변 (1개)

Gerd
Gerd 2011년 7월 6일

0 개 추천

Hi Adi,
sure you can save the position of the figure.
% get current figure paper position
position = get(gcf,'PaperPosition');
Now you can save the position in a .txt file or in .mat or whatever
Gerd

댓글 수: 2

Jan
Jan 2011년 7월 6일
I assume the 'Position' property is meant.
Gerd
Gerd 2011년 7월 6일
OK Jan then
position = get(gcf,'Position');
:-)

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

카테고리

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

질문:

2011년 7월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by