1. findobj has changed! How can I get it behave like it did in 2013?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Vivek Jadye
el 20 de Abr. de 2016
Can you please add a specific example? It would be helpful in understanding the findobj behavior that you are seeing.
Respuestas (1)
Walter Roberson
el 20 de Abr. de 2016
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.
0 comentarios
Ver también
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!