Matlab figure with a variable in it

2 ビュー (過去 30 日間)
wallflower
wallflower 2020 年 4 月 30 日
コメント済み: wallflower 2020 年 5 月 12 日
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 日
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 !

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

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by