I want to know how to test whether an input value is an integer or not. I have tried using the function isinteger, but I obtain, for example, isinteger(3) = 0. Apparently, any constant is double-precision by Matlab default, and is therefore not recognized as an integer. Can anyone tell me what function I'm supposed to use?
MATLAB: How to test if an input value is an integer
integer
Best Answer