Transfer Function in Simulink

조회 수: 2 (최근 30일)
Vinoth
Vinoth 2011년 12월 15일
Hi all,
i have a Transfer function =(s+1)/(a*s^2 + b*s +1)
I want to change the coefficients 'a' and 'b' during the runtime in simulink..how can i do this??
--vinoth

채택된 답변

Paulo Silva
Paulo Silva 2011년 12월 15일
Use those variables (a and b) in the simulation, define them in the workspace with default values before the simulation starts
a=1;
b=1;
Simulink reads the values and uses them but it doesn't read them again unless you stop and run the simulation again or you execute the command:
set_param('sys', 'SimulationCommand', 'update')
Example
a=2;
b=4;
set_param('sys', 'SimulationCommand', 'update')
  댓글 수: 1
Vinoth
Vinoth 2011년 12월 15일
Thanks a lot :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by