Main Content

upper

Convert a string to uppercase

Description

example

newStr = upper(str) converts the lowercase characters in str to uppercase characters and leaves all other characters unchanged.

Note

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

Examples

expand all

Convert the lowercase text in Hello, world! to uppercase.

h = "Hello, world!"
x = upper(h)

Stateflow chart that uses the upper operator in a state.

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

Limitations

Introduced in R2021b