MATLAB Functions Help Desk

isa

Purpose

Detect an object of a given class

Syntax

Description

K = isa(obj,'class_name') returns logical true (1) if obj is of class (or a subclass of) class_name, and logical false (0) otherwise.

The argument class_name is the name of a user-defined or pre-defined class of objects. Predefined MATLAB classes include

cell

Multidimensional cell array

double

Multidimensional double precision array

sparse

Two-dimensional real (or complex) sparse array

char

Array of alphanumeric characters

struct

Structure

'class_name'

User-defined object class

:

Examples

isa(rand(3,4),'double') returns 1.

See Also

class       Create object or return class of object



[ Previous | Help Desk | Next ]