Filter löschen
Filter löschen

Detect figure or uifigure from the handle?

3 Ansichten (letzte 30 Tage)
Bruno Luong
Bruno Luong am 15 Sep. 2023
Kommentiert: Cris LaPierre am 15 Sep. 2023
Simple question: How can I detect if the handle of Type 'figure' corresponds to a figure or uifigure?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 15 Sep. 2023
figure() handles do not have a property isUIFigure
uifigure() handles have a property isUIFigure with value true
  1 Kommentar
Bruno Luong
Bruno Luong am 15 Sep. 2023
Thanks so I use this
isUIFigure = @(hfig) isprop(hfig ,'isUIFigure')

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Voss
Voss am 15 Sep. 2023
Where f is your figure or uifigure handle:
matlab.ui.internal.isUIFigure(f)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by