iscellstr
Tests whether a value is a cell array of character vectors.
Category: Language Fundamentals > Data Types
Syntax
tf = iscellstr(A)
Returns true if A is a cell array in which every element is a character vector.
Description
A single non-text element, such as a number, makes the result false. An empty cell array counts as true. String arrays are not cell arrays, so iscellstr is false for them; use isstring or cellstr to convert.
Input arguments
A- Any value.
Output arguments
tf- Logical scalar.
Example
Text-only cells
iscellstr({'a', 'bc'})
iscellstr({'a', 1})
iscellstr({})
Output
ans = logical
1
ans = logical
0
ans = logical
1