Detect figure or uifigure from the handle?

 Accepted Answer

figure() handles do not have a property isUIFigure
uifigure() handles have a property isUIFigure with value true

1 Comment

Thanks so I use this
isUIFigure = @(hfig) isprop(hfig ,'isUIFigure')

Sign in to comment.

More Answers (1)

Where f is your figure or uifigure handle:
matlab.ui.internal.isUIFigure(f)

Categories

Find more on Develop Apps Programmatically in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!