Hi. I created a GUIDE UI and I am trying to determine whether an input into an editable textbox is an integer.
If I do:
[I,OK] = str2num(get(handles.no_ADC,'String'));
The output is 0 (or false), because str2num converts strings into type floating. I thought about doing
but that is useless too because it would just convert an I=3.2 to 3 and return true, which is not what I want.
Is my only option to do
since this will tell me if there is a decimal point in I, which means its not an integer?