how to determine if the input to a function is integer in matlab : I'm writing a code to take an input ( and integer) interpretes the input as year and return the century . the code works fine except for input like cent = centuries ([ 1 2])
,in this case it is supposed to return empty string but it is returning first century . I've used ~isinteger and ~isscalar and y<1 and the likes but its still returning a value. please what can i do here ?