isa - Determine whether input is object of given class matlab
2012-03-27 13:59
316 查看
isa - Determine whether input is object of given class
Syntax
K = isa(obj, 'class_name')Description
K = isa(obj, 'class_name') returnslogical1 (true) if obj isof class (or a subclass of) class_name,and logical
0 (false) otherwise.
The argument obj is a MATLAB objector an object of the Java programming language. The argument
class_name isthe name of a MATLAB (predefined or user-defined) or a Java class.Predefined MATLAB classes include
logical | Logical array of true and false values |
char | Characters array |
numeric | Integer or floating-point array |
integer | Signed or unsigned integer array |
int8 | 8-bit signed integer array |
uint8 | 8-bit unsigned integer array |
int16 | 16-bit signed integer array |
uint16 | 16-bit unsigned integer array |
int32 | 32-bit signed integer array |
uint32 | 32-bit unsigned integer array |
int64 | 64-bit signed integer array |
uint64 | 64-bit unsigned integer array |
float | Single- or double-precision floating-point array |
single | Single-precision floating-point array |
double | Double-precision floating-point array |
cell | Cell array |
struct | Structure array |
function_handle | Function handle |
'class_name' | MATLAB class or Java class |
issparse.To check for a complex array, use ~isreal.
Examples
isa(rand(3,4),'double') ans = 1
The following example creates an instance of the user-defined MATLAB classnamed
polynom. The isa functionidentifies the object as being of the
polynom class.
polynom_obj = polynom([1 0 -2 -5]); isa(polynom_obj, 'polynom') ans = 1
相关文章推荐
- nested exception is java.lang.IllegalArgumentException: object is not an instance of declaring class
- Question 30: What is the order of destructor calls for an object of class Y inherited from class X that has an object of class A
- How to solve 'object of abstract class type "newFoo" is not allowed'?
- Given two strings s and t, write a function to determine if t is an anagram of s.
- 'GetHeadPosition' : is not a member of 'CTypedPtrList<class CObject,class CLetter *>'
- object of abstract class type "我的类" is not allowed 解决方案
- 报错:object is not an instance of declaring class
- Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe
- java axis调用cxf 的坑object is not an instance of declaring class while invoking public
- spring的 object is not an instance of declaring class
- 反射获取方法时:object is not an instance of declaring class
- How to determine the size of an object of class?
- Determine whether the product of a and b is even or odd.
- Xfile 错误记录 object is not an instance of declaring class
- Given an array of size N in which every number is between 1 and N, determine if there are any dupli
- 【转载】#344 - Hidden Base Class Member Is Invoked Based on Declared Type of Object
- Find whether a given number is a power of 4 or not
- php对象:get_object_vars(), get_parent_class(),is_subclass_of(),interface_exists()
- matlab 报错 Function 'subsindex' is not defined for values of class 'network'.
- 使用反射报异常:object is not an instance of declaring class解决方案