counting number of textbox or patches in a matlab figure

1 visualización (últimos 30 días)
gummiyummi
gummiyummi el 25 de Ag. de 2020
Comentada: gummiyummi el 25 de Ag. de 2020
Is there a programmable method to count the number of patches or textboxes there are in a given figure, and then put the number in an array?

Respuestas (1)

Jan
Jan el 25 de Ag. de 2020
Editada: Jan el 25 de Ag. de 2020
% All text boxes:
List1 = findall(HandleOfFigure, 'Type', 'uicontrol', 'Style', 'text')
Count1 = numel(List1)
% All patches:
List2 = findall(HandleOfFigure, 'Type', 'patch')
Count2 = numel(List2)
  1 comentario
gummiyummi
gummiyummi el 25 de Ag. de 2020
I get the following error:
"Undefined function or variable 'HandleOfFigure'

Iniciar sesión para comentar.

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by