MATLAB Answers


Simulink Decreasing Constant over Time

Asked by Kyle Taliaferro on 27 Feb 2013

I have a constant of 350 and a time of 60 second. I need the constant to decrease by 10 every second for 10 second and then stay the same after the ten seconds. So the constant would be 350 at start and then become 250 after the ten seconds and remain at 250 for the remaining 50 seconds. How can i achieve this? This constant should be decreasing at a liner rate.



No products are associated with this question.

1 Answer

Answer by Teja Muppirala
on 27 Feb 2013
 Accepted answer

Here are two ways to do it:

1. [Ramp] --> [Saturation] -->

2. Use the Signal Builder block (works for more complicated piecewise linear signals)

  1 Comment

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!