How do I get signals to repeat to infinity?

11 次查看(过去 30 天)
Good morning.
I have the following signals in the Signal Builder block in Simulink. These signals need to be timed as shown, and I need this 30 second sequence to repeat as long as the program is running. How can this be done?
Running Matlab R2012b.
Thanks.

采纳的回答

Swarooph
Swarooph 2016-7-26
I don't think this can be done using the Signal Builder block. It has only 3 options to set after final time. 'Hold final value', 'Set to Zero' or 'Extrapolate'. (File --> Simulation Options). You can instead try to use a 'Repeating Sequence' block.
  • Export data from Signal Builder to Workspace. (File --> Export to Workspace). For this example keep the variable name as channels.
  • Now your time data is specified by variables such as
channels(1).xData
channels(2).xData
.
.
.
channels(n).xData
  • Your signal data is specified by variables such as
channels(1).yData
channels(2).yData
.
.
.
channels(n).yData
  • Use a repeating sequence block and set Time Values and Output Values appropriately. You will have as many blocks as signals.
  • If you are planning on doing something like this quite often, you could create a masked subsystem that takes the entire channels variable and redistribute it to several programmatically created Repeating Sequence blocks underneath.
  3 个评论
Abderrahmane GHIMOUZ
Hi, is it possible to show me the parameters of the delay block you used ? Thank you in advance

请先登录,再进行评论。

更多回答(1 个)

Rodrigo Prat
Rodrigo Prat 2020-6-20
Michael you are a genious

Community Treasure Hunt

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

Start Hunting!

Translated by