MATLAB: Is isstr not recommended

charischarisstrMATLABstring

When using isstr in my code, I get a warning that it is not recommended and I should use ischar instead. But ischar doesn't provide the same functionality as isstr. For a string, ischar returns 0 and isstr returns 1, while for a character array, ischar returns 1 and isstr returns 1. There doesn't seem to be any replacement for isstr that provides the same functionality. Why is this warning displayed?

Best Answer

The string (link) datatype was introduced in R2016b, along with a number of functions to work with it, of which isstring (link) is one. I suspect the recommendations for isstr changed to be compatible with the new datatype, and avoid any ambiguity.