Chapter 7

String Manipulation


Key Terms



control characters

white space characters

leading blanks

trailing blanks

vectors of characters

empty string

string concatenation



A string in the MATLAB® software consists of any number of characters and is contained in single quotes. Actually, strings are vectors in which every element is a single character, which means that many of the vector operations and functions that we have already seen work with strings.

MATLAB also has many built-in functions that are specifically written to manipulate strings. In some cases, strings ...

Get Matlab: A Practical Introduction to Programming and Problem Solving, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.