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'
을 삭제하기 위해 두 번째 핸들에 대응하는 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 명령 창에 입력하십시오. 웹 브라우저는 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)