isstr

Purpose

Detect strings.

Synopsis

k = isstr(t)

Description

The statement t = 'Hello, World.' creates a vector whose components are the ASCII codes for the characters. The column dimension of t is the number of characters. It is no different than other MATLAB vectors, except that when displayed, text is shown instead of the decimal ASCII codes.

t =
    Hello, World.
Associated with each MATLAB variable is a flag that, if set, tells the MATLAB output routines to display the variable as text.

isstr(t) returns 1 if the text display flag for t is set, and 0 otherwise.

isstr also works on matrices.

Examples

isstr('Hello') is 1.

isstr(abs('Hello')) is 0.

See Also

setstr, strcmp, strings

(c) Copyright 1994 by The MathWorks, Inc.