How to change variables with time, Simulink

14 visualizaciones (últimos 30 días)
Leona
Leona el 27 de Nov. de 2024
Movida: Fangjun Jiang el 27 de Nov. de 2024
i'm using a varible to define the paramters of a switch in Simulink, I want this variable value to change after a period of time. I understand that I may not actually be able to change the value of a variable during a simulation but i'm not sure how to get around this, thanks.

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 27 de Nov. de 2024
Movida: Fangjun Jiang el 27 de Nov. de 2024
The Switch block has only one parameter, the criteria used to compare with the second input. I would use a Relational Operator block to do the comparison and then use the Switch block. Your variable changes with time. It is a signal, not a parameter. Feed this signal to the Relational Operator block and the problem is solved.

Categorías

Más información sobre Event Functions en Help Center y File Exchange.

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by