Clear Filters
Clear Filters

Suptitle - is it possible to use with arguments besides text?

2 views (last 30 days)
for example - I want my super title to display the value of my variable "num".
I coded this:
suptitle('my number=%u',num)
and got the error message:
Error using suptitle Too many input arguments.
Can I make it somehow?
Thanks, Shir

Accepted Answer

michio
michio on 1 Sep 2016
suptitle accepts one input argument, so try
suptitle(['my number= ',num2str(num)])
  2 Comments
shir shalom
shir shalom on 1 Sep 2016
Edited: shir shalom on 1 Sep 2016
great, thanks! also found out it works with sprintf:
suptitle(sprintf('my number=%u',num))

Sign in to comment.

More Answers (0)

Categories

Find more on Labels and Annotations in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!