how to superscript in subtitle of a figure?

Hi everyone,
I want to superscript my + in the Chemical formula I have in one of my figures such as this : CH5NO2+
by introducing a underscore before the + sign, it does a subscripting.
h=suptitle('CH5NO2_+')
is there similar way to do it for the superscript?
Many thanks in advance!

 Accepted Answer

h=suptitle('CH5NO2^+')

2 Comments

Starting in r2018b, you can use sgtitle in place to suptitle.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!