Numeric values (floating-point and integer values):isa(a,'numeric')ans =
1isa Returns True for Subclassesisa returns true for classes derived from the specified class. For example, the SubInt
class derives from the built-in type int16:classdef SubInt < int16
methods
function obj = SubInt(data)
if nargin == 0
data = 0;
end
obj = obj@int16(data);
end
end
endBy definition, an instance of the SubInt class is also an instance of the int16 class:aInt = SubInt;
isa(aInt,'int16')ans =
1Using the integer category also returns true:isa(aInt,'integer')ans =
1Test for Specific Types
The class function returns the name of the most derived class of an object:class(aInt)12 How to Build on Other Classes