Problem with empty text input GUI
古いコメントを表示
Hey guys!
I recently started using the GUI option and I´ve been having problems with text inputs, whatever I do I cannot seem to find out wheter it´s empty or not...
It should be as simple as:
handles.Xmin=get(hObject,'String');
if isempty(handles.Xmin)
%commands
end
Right? But that way I keep getting something like 6.00072 as answer.
More precisely, this code goes inside an okbutton_pressfcn, so, it should check if my value is empty whenever I press OK.
Any suggestions?
Thanks already!
3 件のコメント
Ingrid
2016 年 2 月 4 日
are you sure you are using the right hObject? It should be something like handles.editText1
Walter Roberson
2016 年 2 月 4 日
Next time it happens, to debug use
get(handles.Xmin)
and look at the properties to figure out what handle it is that has somehow been stored in the String property.
Armando Assini
2016 年 2 月 4 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!