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 Center および File ExchangeMigrate GUIDE Apps についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by