How to make reset function ?

조회 수: 4 (최근 30일)
ElizabethR
ElizabethR 2016년 6월 22일
댓글: SUKANT 2022년 7월 14일
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 ^^

채택된 답변

Walter Roberson
Walter Roberson 2016년 6월 22일
set( findall(0, 'type', 'uicontrol', 'style', 'text'), 'String', {''});
delete( findall(0, 'type', 'image') );
  댓글 수: 2
ElizabethR
ElizabethR 2016년 6월 23일
hi Walter, Thank you so much. i've solved my problem. God Bless ^^
SUKANT
SUKANT 2022년 7월 14일
can you tell me how to remove only the image

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by