Programming |
Identifying Logical Arrays
This table shows the commands you can use to determine whether or not an array x
is logical. The last function listed, cellfun
, operates on cell arrays, which you can read about in the section Cell Arrays.
Command |
Operation |
whos (x) |
Display value and data type for x . |
islogical (x) |
Return true if array is logical. |
isa (x, 'logical') |
Return true if array is logical. |
class (x) |
Return string with data type name. |
cellfun ('islogical', x) |
Check each cell array element for logical. |
How Logical Arrays Are Used | Characters and Strings |
© 1994-2005 The MathWorks, Inc.