How to use 'Edit Text' efficiently in a GUI?
古いコメントを表示
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!
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で String Parsing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!