フィルターのクリア

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

2 ビュー (過去 30 日間)
shir shalom
shir shalom 2016 年 9 月 1 日
コメント済み: michio 2016 年 9 月 1 日
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

採用された回答

michio
michio 2016 年 9 月 1 日
suptitle accepts one input argument, so try
suptitle(['my number= ',num2str(num)])
  2 件のコメント
shir shalom
shir shalom 2016 年 9 月 1 日
編集済み: shir shalom 2016 年 9 月 1 日
great, thanks! also found out it works with sprintf:
suptitle(sprintf('my number=%u',num))
michio
michio 2016 年 9 月 1 日
Great:) sprintf gives more flexibility.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLabels and Annotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by