MATLAB Function Reference | ![]() ![]() |
Determine if item is a character array
Syntax
Description
tf = ischar(A)
returns logical true (1
) if A
is a character array and logical false (0
) otherwise.
Examples
Given the following cell array,
C{1,1} = magic(3); C{1,2} = 'John Doe'; C{1,3} = 2 + 4i C = [3x3 double] 'John Doe' [2.0000+ 4.0000i]
ischar
shows that only C{1,2}
is a character array.
See Also
char
, isnumeric
, islogical
, isobject
, isstruct
, iscell
, isa
, is*
![]() | iscellstr | isempty | ![]() |