read text and put it in the title
3 ビュー (過去 30 日間)
古いコメントを表示
I want to have a text as an input of a function test.m such that
function test(x,y,title_number, title_name)
plot(x,y)
end
Suppose I choose
test(x,y,1, temperature)
I want to have the title of the plot as
Figure 1. Temperature
Then I want to understand how to write title like
title(['Figure ',num2str(figurenumber),':]
Please advise.
4 件のコメント
Rik
2020 年 6 月 9 日
doc figure
Then you can click on the link with 'figure properties'.
madhan ravi
2020 年 6 月 19 日
alpedhuez you have asked 220 questions in total and I'm really surprised that you are still asking the basic questions ?
回答 (1 件)
Vishal Gaur
2020 年 6 月 9 日
編集済み: Vishal Gaur
2020 年 6 月 19 日
You can add a title with variable in following way:
Suppose you want title like this: Figure 1: Sample Plot
figNo = 1;
figName = 'Sample Plot';
title(['Figure ' num2str(figNo) ': ' figName])
For more information, you can refer this documentation:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!