setstr

Converts character codes into text (obsolete name of char).

Category: Other public functions: strfun

Syntax

s = setstr(x)

Returns the characters whose codes are the elements of x.

Description

setstr comes from the earliest versions of MATLAB and does what char does for numeric input. New code should call char, which also accepts text and cell arrays.

Input arguments

x
Numeric array of non-negative integer character codes.

Output arguments

s
A char array of the same size as x.

Example

Codes to text

s = setstr([72 101 108 108 111])
Output
s = 'Hello'

See also

char double string blanks