1. findobj has changed! How can I get it behave like it did in 2013?

조회 수: 1 (최근 30일)
Bill betz
Bill betz 2016년 4월 20일
답변: Walter Roberson 2016년 4월 20일
Running 2015 version, and 'findobj' behaves completely differently than in 2013. It used to return handles only, now it returns a matrix. ALSO, openfig used to open with a handle - now if you use openfig and then findobj, the handle (number as it's now called) is EMPTY! HELP!
  댓글 수: 1
Vivek Jadye
Vivek Jadye 2016년 4월 20일
Can you please add a specific example? It would be helpful in understanding the findobj behavior that you are seeing.

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

답변 (1개)

Walter Roberson
Walter Roberson 2016년 4월 20일
findobj returns as many objects as it locates, under its search rules.
One thing to keep in mind is that as of R2014b, more graphics objects switched to have HandleVisibility 'callback' or 'off'. findobj() does not find those objects even if they are direct parameters, because findobj() is restricted to visible handles (those whose handle visibility is 'on', always, together with those whose handle visibility is 'callback' if you are calling findobj within a callback.) findall() is what is needed to search for all handles.
If multiple accessible handles are located then findobj will return them. Multiple handles may be located if there are multiple objects with the same properties. That can happen for objects in .fig files or in the GUIDE handles structure if you multiple instances exist.

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by