MATLAB: How to print a ‘%’ character using SPRINTF in MATLAB 7.7 (R2008b)

MATLAB

I would like to print a string containing the '%' character. However, when I attempt the following:
sprintf('100%')
The output reads:
100

Best Answer

To escape the percent symbol, use two percent signs. For example:
sprintf('100%%')
Yields the output:
100%