Time dependent matrix entry

6 views (last 30 days)
Good day,
I've got a repeating sequence block with a 1x2-matrix for the durations of the output values. I however need to change these values, each entry, according to a ramp function that implements a linear increase. Below is a setup of the model I currently have in Simulink.
Any idea on how I can achieve this?

Accepted Answer

Jon on 26 Oct 2021
Edited: Jon on 26 Oct 2021
Under source blocks in the Simulink library there is a block called Ramp. It seems like this should work for your purpose.
Christo van Rensburg
Christo van Rensburg on 28 Oct 2021
Hi John,
So I actually managed to figure it out on my own using the blocks shown below:
So what happens is:
  • Using a "Variable Pulse Generator" block to generate pulses with the frequency specified by the preceeding blocks.
  • I then simply add the appropriate gain (5).
  • Finally, each signal is delayed by a time stamp according to my requirement with the "Transport Delay" block.
But thanks once more for your time and effort to help me get to the bottom of this!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by