Info

This question is closed. Reopen it to edit or answer.

Enlarge sample time in simulink

1 view (last 30 days)
Elie
Elie on 14 Nov 2012
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello everyone,
I'm trying to enlarge the time of each sample in a waveform. I have a waveform with samples between 0 and 7 and each of them lasts a very short time. I have a succesions of 20 values and then, a constant value until next 20 values. I would like to enlarge the time that the 20 values lasts, in order to not have this constant period between each 20 values group. I can not found any block doing this for me ... I tried with buffer / unbuffer without success. Hope somebody will understant my problem and maybe have a solution !
Thanks for help,
Elie
  1 Comment
Kaustubha Govind
Kaustubha Govind on 28 Nov 2012
Elie: If you increased the sample-time of the signal, will you not drop samples when the signal is not constant? You cannot have a signal with a variable sample-rate in Simulink (although I think you could create an S-function block that will process your block at a variable rate).

Answers (1)

Babak
Babak on 28 Nov 2012
You can use, Simulink block named "Signal Generator" or "Repeating Sequence" or a "Pulse Generator" in the sources library of Simulink's library browser.
When you say "Waveform" you ned to mention which block you are using, because Simulink does not have any block called "Waveform".
Using the blocks I mentioned, you can design whatever waveform you like to have.
You cannot have a few blocks/signals with sampling time different from the sampling time of the rest of the model.
you can change the sampling time of the model in the configuration parameter's dialog box.

This question is closed.

Products

Community Treasure Hunt

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

Start Hunting!