프로그래밍 방식의 모델 편집
Simulink® 모델을 프로그래밍 방식으로 만들고 편집하고 검색하고 검사할 수 있습니다. 프로그래밍 방식으로 모델과 상호 작용하려면 모델을 불러와야 합니다. 모델을 만들거나 여는 경우에도 모델을 불러오게 됩니다. "모델 만들기" 섹션에 나열된 함수를 사용하여 모델을 만들거나 불러오거나 열 수 있습니다. 그런 다음 이 페이지에 나와 있는 다른 함수들을 사용하여 모델과 모델 내용을 프로그래밍 방식으로 편집할 수 있습니다. 함수 입력 인수에서, 함수가 편집하게 될 객체를 핸들, 경로 또는 파일 이름으로 지정할 수 있습니다. 이 대상 객체는 모델, 컴포넌트(예: 서브시스템 또는 라이브러리) 또는 모델 요소(예: 블록 또는 신호 선)일 수 있습니다. 이름과 위치를 알고 있는 대상 객체를 지정할 수도 있고, 특정 기준을 충족하는 대상 객체를 프로그래밍 방식으로 검색할 수도 있습니다. 자세한 내용은 함수 문서와 Get Handles and Paths 항목을 참조하십시오.
지적 재산을 공개하지 않고 타사와 모델을 공유하려는 경우에는 Simulink.ModelReference.protect
(Embedded Coder) 함수를 사용하여 보호되는 버전의 모델을 만드십시오. 자세한 내용은 Protect Models to Conceal Contents (Embedded Coder) 항목을 참조하십시오.
시뮬레이션을 프로그래밍 방식으로 실행하는 방법에 대한 자세한 내용은 프로그래밍 방식으로 시뮬레이션 실행하기 항목을 참조하십시오. 프로젝트를 프로그래밍 방식으로 만들고 편집하려면 프로그래밍 방식으로 프로젝트를 만들고 편집하기 항목을 참조하십시오. Simulink 편집기를 프로그래밍 방식으로 구성하려면 Programmatic Model Editor Appearance Parameters 항목을 참조하십시오. MATLAB® 명령 창에서 시뮬레이션을 디버그하려면 프로그래밍 방식으로 시뮬레이션 디버그하기 항목을 참조하십시오.
함수
객체
ModelFinderFilter | Model Finder search filter (R2025a 이후) |
Simulink.Annotation | 텍스트 주석, 이미지 주석, 영역 주석을 만들고 속성 지정 |
도움말 항목
프로그래밍 방식으로 편집할 수 있도록 객체 지정하기
- Get Handles and Paths
Programmatically specify models, components, and model elements you want to edit. - Search Programmatically
Find models, blocks, signal lines, ports, and annotations.
모델 만들기
- Create, Load, Open, Save, and Close Models Programmatically
Run model file operations. - Add, Copy, Replace, and Delete Blocks Programmatically
Populate models with blocks. - Connect Blocks Programmatically
Connect blocks with signal lines. - Programmatically Specify Block Parameters and Properties
To write scripts that modify block behavior, determine the programmatic names and supported values of block parameters and properties.
모델 형식 지정하기
- Configure Model Layout Programmatically
Change the position and arrangement of blocks. - Group Blocks into Subsystems Programmatically
Use subsystems to organize large models. - Configure Model Element Names and Labels Programmatically
Name blocks, and label signal lines and ports. - Create and Edit Annotations Programmatically
Create and edit text, image, and area annotations programmatically. - Configure Model Style Elements Programmatically
Change model fonts and colors. - Control Masks Programmatically
Specify and edit block masks programmatically.
모델 공유하기
- Print Models Programmatically
Use the MATLABprint
command to print Simulink models.