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
, orstring
)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
ordatetime
array meet certain conditionsAn 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.
Function | Description |
---|---|
Determine if input has specified data type | |
Determine if application data exists | |
isapprox | Determine approximate equality |
Determine if matrix is within specific bandwidth | |
Determine which elements are within specified range | |
Determine if input is | |
Determine if input is | |
Determine if inputs are names of categories | |
Determine if input is cell array | |
Determine if input is cell array of character vectors | |
Find abrupt changes in input | |
Determine if input is character array | |
Determine if input is column vector | |
Determine if input is Component Object Model (COM) object | |
Determine if dictionary is configured | |
Determine if input is | |
Determine if matrix is diagonal | |
Find elements of | |
Determine if input is | |
Determine if input is empty array | |
Determine if input is enumeration | |
Determine if arrays are numerically equal | |
Determine if arrays are numerically equal, treating
| |
Determine if input is Component Object Model (COM) object event | |
Determine if input is MATLAB structure array field | |
Determine if input is a file | |
Find array elements that are finite | |
Determine if input is floating-point array | |
Determine if input is folder | |
Determine if input is valid graphics object handle | |
Determine if input is valid graphics or Java object handle | |
Determine if matrix is Hermitian or skew-Hermitian | |
Determine if graphics hold state is on | |
Find array elements that are infinite | |
Determine if input is integer array | |
Determine if input is Component Object Model (COM) interface | |
Determine if input is Java object | |
Determine if dictionary contains key | |
Determine if input is MATLAB keyword | |
Find characters that are letters | |
Find local maxima in input | |
Find local maxima in 2-D data | |
Find local minima in input | |
Find local minima in 2-D data | |
Determine if input is logical array | |
Determine if version is for macOS platform | |
Determine if input is matrix | |
Find array elements that are members of set array | |
Find array elements, within tolerance, that are members of set array | |
Determine if object has specified method | |
Find missing values in input | |
Find numeric array elements that are | |
Find | |
Determine if input is numeric array | |
Determine if input is MATLAB object | |
Determine if input is ordinal | |
Find outliers in input | |
Determine if version is for Windows® (PC) platform | |
Find array elements that are prime | |
Determine if input is object property | |
Determine if categories of | |
Determine if all numeric array elements are real numbers | |
Determine if input times are regular with respect to time or calendar unit | |
Determine if input is row vector | |
Determine if input is scalar | |
Determine if array is sorted | |
Determine if matrix or table rows are sorted | |
Find characters that are space characters | |
Determine if input is sparse | |
Determine if input is string array | |
Determine if input is string array with one element | |
Find characters in input strings that are of specified category | |
Determine if input is structure array | |
Determine if version is Student Version | |
Determine if matrix is symmetric or skew-symmetric | |
Determine if input is table | |
Determine if input is table or timetable | |
istall | Determine if input is tall array |
Determine if input is timetable | |
Determine if matrix is lower triangular | |
Determine if matrix is upper triangular | |
Find undefined elements in | |
Determine if input has specified underlying data type | |
isuniform | Determine if vector is uniformly spaced |
Determine if version is for Linux® or macOS platforms | |
Determine if input is valid handle | |
Determine if input is valid variable name | |
Determine if input is vector | |
Find elements of |
See Also
exist
| openvar
| what
| which
| who
| whos
| Workspace Browser