The title of a figure
이전 댓글 표시
Hye, How could I give a title to a figure that depend on the input of the function that create the figure.
채택된 답변
추가 답변 (1개)
Daniel Shub
2011년 7월 19일
Title can take any string. You can use [] and num2str to make a meaningful string that depends on the input to your function
x = 1:3
title(['This figure used x = ', num2str(x)])
In some cases you might want to use sprintf instead of num2str to get a little better control of the formatting.
댓글 수: 2
Liber-T
2011년 7월 19일
Daniel Shub
2011년 7월 19일
Where do you want the title to show up? I think
figure
plot
plot
title
figure
plot
title
will work
카테고리
도움말 센터 및 File Exchange에서 Title에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!