ischar

Return true if variable var is a char array.

Syntax

  • res = ischar(var)

Input argument

  • var - a variable

Output argument

  • res - a logical: true or false

Description

ischar returns a logical 1 if the argument is a char array and a logical 0 otherwise.

Examples

A = 3;
res = ischar(A)
B = 'NelSon';
res = ischar(B)
C = [1 ; 3];
res = ischar(C)

See also

class, char.

History

VersionDescription

1.0.0

initial version

Author

Allan CORNET

Last updated