generate a ramp signal based on an external input

2 次查看(过去 30 天)
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 个评论
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by