Borrar filtros
Borrar filtros

Help on Matlab Simulink

1 visualización (últimos 30 días)
john michael go
john michael go el 25 de Mzo. de 2021
Respondida: Jonas el 25 de Mzo. de 2021
Hello. I'm new to using simulink. I'm trying to create a model where if the input is not equal to a certain number, it substracts 1 contionously from it.
An example from my work is shown below. In the first picture, when the input is equal to 30, the output is 30. But if the input is not equal to 30, then it will continously subtract 1 from it. The problem is when it starts to subtract. It starts from 0 rather than the input value. In my model, it starts to subtract 1 from 0 rather than 31. I want my model to subtract 1 from 31. The output is show in the 2nd picture.
Any help would be much appreciated.

Respuestas (1)

Jonas
Jonas el 25 de Mzo. de 2021
Set the initial value of the 1/z Unit Delay block to 31.

Categorías

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

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by