Some times it is interesting to know whether the input is a scalar real number, as for example if we are trying to introduce the sampling frequency of a sequence. We can use some of the following commands:

isscalar: determine whether input is scalar (true=1 or false=0).isnumeric: determine whether input is a number (true=1 or false=0).isreal: determine whether input is a real number (true=1 or false=0).isinf: determine whether input is finite (true=1 or false=0).

Thus, if you want to be (absolutely) sure that your variable is a real scalar number (such a valid sampling frequency) you can write