How to use 'Edit Text' efficiently in a GUI?
Afficher commentaires plus anciens
I notices that there are two ways to ues it;
The tag of edit1 is edit1.
Method 1:
function edit1_callback()
num1 = get(hObject,'string');
handles.num1 = num1;
guidatda(gcbo,handles); % why need this command?
function pshbtn1_callback()
y = handles.num1;
guidata(gcbo,handles); % why need it too?
Method 2:
function pshbtn_callback()
y = str2num(get(hObject,handles));
As shown above, what's the difference? And the effect of "guidata(gcbo,handles)" ? Thank you very much!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur String Parsing dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!