Matlab figure with a variable in it

Hello,
I am using a function that computes few vectors products so as to plot figures.
I want to be able to have a figure name for example 'figure_90', where 90 is the temperature variable I define in script.
Thanks in advance

回答 (1 件)

Geoff Hayes
Geoff Hayes 2020 年 4 月 30 日

1 投票

wallflower - you can set the name property of the figure. Perhaps try
temperature = 90;
hFigure = figure('Name',sprintf('figure_%d', temperature));

1 件のコメント

wallflower
wallflower 2020 年 5 月 12 日
It worked, thank you !

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

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

質問済み:

2020 年 4 月 30 日

コメント済み:

2020 年 5 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by