As with most programming languages, strings in MATLAB must be contained within some pair of special markers to indicate that they are strings. In the case of MATLAB, apostrophes, or single quotes, are used. Regardless of which language you are using or which quoting characters are used, sometimes you need to use that special character within the string itself. Languages use a variety of strategies used to support this, and MATLAB has its own way of handling this problem. It is possible to use an apostrophe in a title in MATLAB.

- Skill level:
- Easy

### Other People Are Reading

## Instructions

- 1
Boot up MATLAB on your computer. All versions of MATLAB treat quoted stings the same way so the solution to this problem will work with any version.

- 2
Create a simple MATLAB plot to use as a sample for the "Title" command later. A simple way to do this is to use the following command:

plot((0:0.01:1).^2)

This example will create a plot of a parabola.

- 3
Choose an appropriate title sting containing an apostrophe to use as an example such as the following:

This is a parabola's image.

The sting contains an apostrophe.

- 4
Use the "Title" command, replacing the example string below with the string you have chosen. Because it is a MATLAB string, it must be contained within apostrophes. Any apostrophes it contains are simply "doubled up" to indicate that one single apostrophe should be used. For the example, we have:

title('This is a parabola''s image');

Note that two apostrophes appear in the example word "parabola" above.