필터 지우기
필터 지우기

How Can I deactivate a simulink block from a M file

조회 수: 3 (최근 30일)
Ilkay Meseli
Ilkay Meseli 2013년 6월 13일
Hi everyone,
I have general simulink model for modelling my system. This model is used for different analaysis. Now, For using this model in different analysis, I'm using 'comment out' options for deactivate some blocks.
I want to control my simulink file with m file.
Can I be done this process by using m file
thank you

채택된 답변

Andreas Goser
Andreas Goser 2013년 6월 13일
편집: Andreas Goser 2013년 6월 13일
There is a block parameter 'Commented' you can use with SET_PARAM and GET_PARAM commands. Example
  • Open the vdp demo:
vdp
  • Select the gain block called 'Mu'
  • Try commands:
get_param(gcb,'Commented')
set_param(gcb,'Commented','on')
set_param(gcb,'Commented','off')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by