필터 지우기
필터 지우기

Value of handles.axes in MATLAB GUI

조회 수: 1 (최근 30일)
Chethan
Chethan 2013년 4월 27일
What value will get stored in handles.axes if image is present and if the image is not present? I want check the condition whether image is present or not, and i implemented this
if handles.axes1==0
msgbox('Please insert image. . .', 'Error. . .');
end
but this is not working, please suggest me the best way of doing this.

채택된 답변

Walter Roberson
Walter Roberson 2013년 4월 27일
You could try
if ~ishandle(handles.axes1)
However, if the axes exists but does not contain an image, the axes will still be a handle. But you can test
if isempty(findobj(handles.axes1, 'type', 'image'))
to see whether the axes contains an image
  댓글 수: 1
Chethan
Chethan 2013년 4월 27일
Thank you and it is working, but what does 'type' indicates in above code?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by