フィルターのクリア

generate a ramp signal based on an external input

4 ビュー (過去 30 日間)
Juan Nunez
Juan Nunez 2016 年 5 月 12 日
コメント済み: Juan Nunez 2016 年 5 月 13 日
Hello,
How can I generate a ramp signal based on an external input in matlab. For example, when the external input K changes its value from 0 to 1 then the ramp signal is generated. If this is implemented in simulink, is it required to use the clock block?
Thanks.
  2 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2016 年 5 月 12 日
And if K changes from 1 to 0?
Juan Nunez
Juan Nunez 2016 年 5 月 12 日
K always changes from 0 to 1. Once the ramp period is completed the final value of the ramp is kept during the rest of the simulation.

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

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 5 月 13 日
You can use a clock block, and multiply it by your K value, using a product block, then multiply the output of the product block by a constant to specify the slope of your rampe
  1 件のコメント
Juan Nunez
Juan Nunez 2016 年 5 月 13 日
Thank you Azzi.
It worked.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by