| MATLAB Function Reference | ![]() |
K = isa(obj, 'class_name')
K = isa(obj, 'class_name') returns logical 1 (true) if obj is of class (or a subclass of) class_name, and logical 0 (false) otherwise.
The argument obj is a MATLAB® object or an object of the Java™ programming language. The argument class_name is the name of a MATLAB (predefined or user-defined) or a Java class. Predefined MATLAB classes include
Logical array of true and false values | |
Characters array | |
Integer or floating-point array | |
Signed or unsigned integer array | |
8-bit signed integer array | |
8-bit unsigned integer array | |
16-bit signed integer array | |
16-bit unsigned integer array | |
32-bit signed integer array | |
32-bit unsigned integer array | |
64-bit signed integer array | |
64-bit unsigned integer array | |
Single- or double-precision floating-point array | |
Single-precision floating-point array | |
Double-precision floating-point array | |
Cell array | |
Structure array | |
Function handle | |
MATLAB class or Java class |
To check for a sparse array, use issparse. To check for a complex array, use ~isreal.
isa(rand(3,4),'double')
ans =
1The following example creates an instance of the user-defined MATLAB class named polynom. The isa function identifies the object as being of the polynom class.
polynom_obj = polynom([1 0 -2 -5]);
isa(polynom_obj, 'polynom')
ans =
1![]() | is* | isappdata | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |