Main Content

isstring

Determine if input is string

Description

example

tf = isstring(A) returns 1 (true) if A is a string array. Otherwise, it returns 0 (false).

Note

Only Stateflow® charts that use MATLAB® as the action language support the isstring operator.

Examples

expand all

Return a 1 if the argument is a string or a 0 if the argument is not a string.

h = "Hello";
w = 9;
x = isstring(h)
y = isstring(w)

Stateflow chart that uses the blanks operator in a state.

Results from stateflow chart that uses the blanks operator in a state.

Introduced in R2021b