Problem with ramp change in waveforms

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?

回答 (1 件)

Sam Chak
Sam Chak 2025 年 5 月 11 日

0 投票

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

1 件のコメント

Sam Chak
Sam Chak 2025 年 5 月 11 日

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

サインインしてコメントする。

カテゴリ

製品

リリース

R2024b

質問済み:

2025 年 5 月 10 日

コメント済み:

2025 年 5 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by