title: Data type Identification showing wrong output MATLAB
body: <p>I would like to check if the value that has been entered by the users are Integer or not. I tried to using the below code, but it gives me the wrong output. When I entered a fractional value, it still shows me &quot;it is an Integer&quot;.</p>
  <pre><code>prompt = {'Please Enter the start time:','Increment:','Stop time:'}; %Asking user to enter the data
  dlgtitle = 'Input'; %Creating a title for the dialog box
  dims = [1 40]; %Adjusting the dimensions
  definput = {'0','0.01','10'}; %Using default values to warn users not to put text instead of number
  answer = inputdlg(prompt,dlgtitle,dims,definput); %storing the three items of data the user enters
  start = str2num(answer{1}); %Converting start value string to number
  increment = str2num(answer{2}); %Converting increment value string to number
  stop = str2num(answer{3}); %Converting stop value string to number
  
  
  
  if start &gt;= stop
      f = msgbox('Start time cannot be greater than end time! Please re-enter!', 'Error!');
  
  elseif increment &gt;= stop
      f = msgbox('The increment cannot be larger than the end time! Please re-enter!', 'Error!');
  elseif start &lt;= -1 
      f = msgbox('The start time can only be positive numbers! Please re-enter!', 'Error!' );
  elseif stop &lt;= -1 
      f = msgbox('The end time can only be positive numbers! Please re-enter!', 'Error!');
  elseif increment &lt;= -1 
      f = msgbox('The increment can only be positive numbers! Please re-enter!', 'Error!');
  elseif isempty(str2num(answer{1}))
      f = msgbox('Input must be a number! Please re-enter!', 'Error!');
  elseif isempty(str2num(answer{2}))
      f = msgbox('Input must be a number! Please re-enter!', 'Error!');
  elseif isempty(str2num(answer{3}))
      f = msgbox('Input must be a number! Please re-enter!', 'Error!');
  end 
  
  start=int16(10); %define 'count' as an 8-bit integer 
  integer_check=isinteger(start)% is count an integer, 1 if yes, 0 if no 
      if integer_check==1 % if isinteger returns a ‘1’ display message
            disp(' Yes it is an integer')
      else                  % if isinteger returns a ‘0’ display message
              disp(' No it is not an integer')
      end
  </code></pre>