Filter löschen
Filter löschen

How to make reset function ?

1 Ansicht (letzte 30 Tage)
ElizabethR
ElizabethR am 22 Jun. 2016
Kommentiert: SUKANT am 14 Jul. 2022
i have GUI ( using Guide ) that contain, axes for display image, static text for display value. I want to make reset function in pushbutton. So, when i click the button it will remove all value in static text and image in axes. i read the reference and found this code :
set( findall(0, '-property', 'String'), 'String', {''});
arrayfun(@(H) set(H, 'Value', get(H, 'Min')), findall(0, '-property', 'Value', '-and', '-property', 'Min'));
i try to use this code, it removed all value in static text, but it don't removed image in axes.it also removed all name of button and panel. so, how to make the reset function which will remove all value in static text and image without remove button's name ?? thank you ^^

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 22 Jun. 2016
set( findall(0, 'type', 'uicontrol', 'style', 'text'), 'String', {''});
delete( findall(0, 'type', 'image') );
  2 Kommentare
ElizabethR
ElizabethR am 23 Jun. 2016
hi Walter, Thank you so much. i've solved my problem. God Bless ^^
SUKANT
SUKANT am 14 Jul. 2022
can you tell me how to remove only the image

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by