Transfer Function in Simulink

2 vues (au cours des 30 derniers jours)
Vinoth
Vinoth le 15 Déc 2011
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

Réponse acceptée

Paulo Silva
Paulo Silva le 15 Déc 2011
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 commentaire
Vinoth
Vinoth le 15 Déc 2011
Thanks a lot :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Modeling dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by