フィルターのクリア

counting number of textbox or patches in a matlab figure

1 回表示 (過去 30 日間)
gummiyummi
gummiyummi 2020 年 8 月 25 日
コメント済み: gummiyummi 2020 年 8 月 25 日
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?

回答 (1 件)

Jan
Jan 2020 年 8 月 25 日
編集済み: Jan 2020 年 8 月 25 日
% All text boxes:
List1 = findall(HandleOfFigure, 'Type', 'uicontrol', 'Style', 'text')
Count1 = numel(List1)
% All patches:
List2 = findall(HandleOfFigure, 'Type', 'patch')
Count2 = numel(List2)
  1 件のコメント
gummiyummi
gummiyummi 2020 年 8 月 25 日
I get the following error:
"Undefined function or variable 'HandleOfFigure'

サインインしてコメントする。

カテゴリ

Help Center および File ExchangePolygons についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by