delete
注釈の削除
説明
例
注釈の削除
この例では、vdp
モデルで注釈をプログラムによって削除する方法を説明します。
例を開きます。次に、vdp
モデルを開きます。
open_system('vdp')
モデル内の注釈のハンドルを取得するには、関数find_system
を使用します。
h = find_system(gcs,'FindAll','on','Type','annotation');
注釈を特定するには、注釈内のテキストをクエリします。
get_param(h,'PlainText')
ans = 3x1 cell
{'Copyright 2004-2022 The MathWorks, Inc.'}
{'Van der Pol Equation' }
{'x'' - µ(1-x^2) x' + x = 0' }
モデルのタイトル 'Van der Pol Equation'
を削除するには、2 番目のハンドルに対応するSimulink.Annotation
オブジェクトを取得します。
an = get_param(h(2),'Object');
モデルから注釈を削除します。
delete(an)
モデル内の注釈のハンドルを取得します。次に、注釈内のテキストをクエリします。
h1 = find_system(gcs,'FindAll','on','Type','annotation'); get_param(h1,'PlainText')
ans = 2x1 cell
{'Copyright 2004-2022 The MathWorks, Inc.'}
{'x'' - µ(1-x^2) x' + x = 0' }
'Van der Pol Equation'
というテキストの注釈がモデルからなくなりました。
入力引数
a
— 注釈
Simulink.Annotation
オブジェクト
注釈。Simulink.Annotation
オブジェクトとして指定します。
バージョン履歴
R2006a より前に導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)