isstring

Return true if variable var is a string array.

Syntax

  • res = isstring(var)

Input argument

  • var - a variable

Output argument

  • res - a logical: true or false

Description

isstring returns a logical 1 if the argument is a string array and a logical 0 otherwise.

Examples

A = 3;
res = isstring(A)
B = "NelSon";
res = isstring(B)
C = [1 ; 3];
res = isstring(C)

See also

class, string, ischar.

History

Version
Description

1.0.0

initial version

Author

Allan CORNET

Last updated