Use is* Functions to Detect State
MATLAB® has many functions that detect if an array or object has a specified state. These functions are sometimes referred to as the is* functions because their names start with is. The functions return logical 1 (true) if the inputs have the specified states, and logical 0 (false) otherwise.
For example, you can use these functions to detect if:
An array has a specified data type (such as numeric, double, categorical, datetime, or string)
A numeric matrix has certain properties (such as being symmetric)
The elements of a numeric array are finite, real, or complex
The elements of a categorical or datetime array meet certain conditions
An array has any elements that are outliers, missing values, or local maxima or minima
An object is a graphics handle, or a Java® or COM object
This table contains an alphabetical list of the most notable is* functions with descriptions of the states that they detect.
<colgroup style=”box-sizing: border-box; font-size: 14px !important;”><col class=”tcol1″ width=”38%” style=”box-sizing: border-box; font-size: 14px !important;”><col class=”tcol2″ width=”62%” style=”box-sizing: border-box; font-size: 14px !important;”></colgroup>
|
Function
| Description |
| — | — |
|
isa
|
Determine if input has specified data type
|
|
isappdata
|
Determine if application data exists
|
|
isbanded
|
Determine if matrix is within specific bandwidth
|
|
isbetween
|
Find elements of datetime or duration array that are within date and time interval
|
|
iscalendarduration
|
Determine if input is calendarDuration array
|
|
iscategorical
|
Determine if input is categorical array
|
|
iscategory
|
Determine if inputs are names of categories
|
|
iscell
|
Determine if input is cell array
|
|
iscellstr
|
Determine if input is cell array of character vectors
|
|
ischange
|
Find abrupt changes in input
|
|
ischar
|
Determine if input is character array
|
|
iscolumn
|
Determine if input is column vector
|
|
iscom
|
Determine if input is Component Object Model (COM) object
|
|
isConfigured
|
Determine if dictionary is configured
|
|
isdatetime
|
Determine if input is datetime array
|
|
isdiag
|
Determine if matrix is diagonal
|
|
isdst
|
Find elements of datetime array that occur during daylight saving time
|
|
isduration
|
Determine if input is duration array
|
|
isempty
|
Determine if input is empty array
|
|
isenum
|
Determine if input is enumeration
|
|
isequal
|
Determine if arrays are numerically equal
|
|
isequaln
|
Determine if arrays are numerically equal, treating NaNs as equal
|
|
isevent
|
Determine if input is Component Object Model (COM) object event
|
|
isfield
|
Determine if input is MATLAB structure array field
|
|
isfile
|
Determine if input is a file
|
|
isfinite
|
Find array elements that are finite
|
|
isfloat
|
Determine if input is floating-point array
|
|
isfolder
|
Determine if input is folder
|
|
isgraphics
|
Determine if input is valid graphics object handle
|
|
ishandle
|
Determine if input is valid graphics or Java object handle
|
|
ishermitian
|
Determine if matrix is Hermitian or skew-Hermitian
|
|
ishold
|
Determine if graphics hold state is on
|
|
isinf
|
Find array elements that are infinite
|
|
isinteger
|
Determine if input is integer array
|
|
isinterface
|
Determine if input is Component Object Model (COM) interface
|
|
isjava
|
Determine if input is Java object
|
|
isKey
|
Determine if dictionary contains key
|
|
iskeyword
|
Determine if input is MATLAB keyword
|
|
isletter
|
Find characters that are letters
|
|
islocalmax
|
Find local maxima in input
|
|
islocalmin
|
Find local minima in input
|
|
islogical
|
Determine if input is logical array
|
|
ismac
|
Determine if version is for macOS platform
|
|
ismatrix
|
Determine if input is matrix
|
|
ismember
|
Find array elements that are members of set array
|
|
ismembertol
|
Find array elements, within tolerance, that are members of set array
|
|
ismethod
|
Determine if object has specified method
|
|
ismissing
|
Find missing values in input
|
|
isnan
|
Find numeric array elements that are NaN (Not-a-Number)
|
|
isnat
|
Find datetime array elements that are NaT (Not-a-Time)
|
|
isnumeric
|
Determine if input is numeric array
|
|
isobject
|
Determine if input is MATLAB object
|
|
isordinal
|
Determine if input is ordinal categorical array
|
|
isoutlier
|
Find outliers in input
|
|
ispc
|
Determine if version is for Windows® (PC) platform
|
|
isprime
|
Find array elements that are prime
|
|
isprop
|
Determine if input is object property
|
|
isprotected
|
Determine if categories of categorical array are protected
|
|
isreal
|
Determine if all numeric array elements are real numbers
|
|
isregular
|
Determine if input times are regular with respect to time or calendar unit
|
|
isrow
|
Determine if input is row vector
|
|
isscalar
|
Determine if input is scalar
|
|
issorted
|
Determine if array is sorted
|
|
issortedrows
|
Determine if matrix or table rows are sorted
|
|
isspace
|
Find characters that are space characters
|
|
issparse
|
Determine if input is sparse
|
|
isstring
|
Determine if input is string array
|
|
isStringScalar
|
Determine if input is string array with one element
|
|
isstrprop
|
Find characters in input strings that are of specified category
|
|
isstruct
|
Determine if input is structure array
|
|
isstudent
|
Determine if version is Student Version
|
|
issymmetric
|
Determine if matrix is symmetric or skew-symmetric
|
|
istable
|
Determine if input is table
|
|
istabular
|
Determine if input is table or timetable
|
| istall | Determine if input is tall array |
|
istimetable
|
Determine if input is timetable
|
|
istril
|
Determine if matrix is lower triangular
|
|
istriu
|
Determine if matrix is upper triangular
|
|
isundefined
|
Find undefined elements in categorical array
|
|
isUnderlyingType
|
Determine if input has specified underlying data type
|
|
isunix
|
Determine if version is for Linux® or macOS platforms
|
|
isvalid
|
Determine if input is valid handle
|
|
isvarname
|
Determine if input is valid variable name
|
|
isvector
|
Determine if input is vector
|
|
isweekend
|






