Simulink.ModelWorkspace
모델의 모델 작업 공간과 프로그래밍 방식으로 상호 작용
설명
Simulink.ModelWorkspace
객체를 사용하여 모델 작업 공간과 상호 작용합니다. 예를 들어, 변수를 추가하거나 제거하고, 작업 공간의 데이터 소스를 설정하고, 작업 공간에 변경 사항을 저장할 수 있습니다.
자세한 내용은 모델 작업 공간 항목을 참조하십시오.
생성
Simulink.ModelWorkspace
를 만들려면 get_param
함수를 사용하여 모델 파라미터 ModelWorkspace
의 값을 쿼리하십시오. 예를 들어, myModel.slx
라는 모델의 모델 작업 공간을 나타내는 mdlWks
라는 객체를 만들려면 다음을 입력하십시오.
mdlWks = get_param('myModel','ModelWorkspace')
속성
객체 함수
getVariable | 모델의 모델 작업 공간에 있는 변수의 값 반환 |
getVariablePart | Get value of variable property in model workspace |
setVariablePart | Set property of variable in model workspace |
hasVariable | Determine whether variable exists in the model workspace of a model |
whos | Return list of variables in the model workspace of a model |
saveToSource | Save model workspace changes to the external data source of the model workspace |
save | Save contents of model workspace to a MAT-file |
reload | Reinitialize variables from the data source of a model workspace |
evalin | Evaluate expression in the model workspace of a model |
clear | 모델의 모델 작업 공간에서 변수 지우기 |
assignin | 모델의 모델 작업 공간 내 변수에 값 할당 |
예제
버전 내역
R2006a 이전에 개발됨