How do I get the figure number in MATLAB R2014b?
70 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2014 年 10 月 7 日
コメント済み: Steven Lord
2017 年 8 月 16 日
How do I get the figure number in MATLAB R2014b?
採用された回答
MathWorks Support Team
2014 年 10 月 7 日
Starting in MATLAB R2014b, figure handles are object handles where previously they were integers. Now to get the associated number for the figure, query the new Number property. For example, this code gets the number for the current figure.
n = get(gcf,'Number')
n =
1
The Number property is the value displayed in the figure title bar.
You can refer to a figure by its integer number. For example, figure(2) makes the figure with a Number property value of 2 the current figure.
1 件のコメント
Steven Lord
2017 年 8 月 16 日
figure handles are object handles where previously they were integers. So in releases prior to R2014b, gcf returns a number not an object. The value 'on' that you receive is the value of the NumberTitle property of the figure.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!