How to use 'Edit Text' efficiently in a GUI?
Mostra commenti meno recenti
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!
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su String Parsing in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!