Problem with ramp change in waveforms

2 visualizaciones (últimos 30 días)
Hossein
Hossein el 10 de Mayo de 2025
Comentada: Sam Chak el 11 de Mayo de 2025
I am simulating a circuit in Simulink. I also have to use MATLAB function block along with circuit elements. I want the output of myMATLAB function to cahnge instantly between its values but instead when I zoom in the output changes from one value to another in a ramp kind of way. How can I force my signals to change instantly?

Respuestas (1)

Sam Chak
Sam Chak el 11 de Mayo de 2025

You can force the signal to 'jump' instantly at the point of discontinuity by using the sign function.

  1 comentario
Sam Chak
Sam Chak el 11 de Mayo de 2025

Else, if you prefer linguistic instruction, you can use the If–Else conditional statement.

Iniciar sesión para comentar.

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