generate a ramp signal based on an external input

조회 수: 2 (최근 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

추가 답변 (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