필터 지우기
필터 지우기

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 CenterFile Exchange에서 Labels and Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by