Importing vector from workspace to simulink then conditionally use them (Communication related)

1 次查看(过去 30 天)
Hello, I am currently working on a communication link simulation.
I need to import some pre-defined vector from workspace and I need to simulate it going around a link with some error channel.
I was able to use "Signal From Workspace" block to import the vector to Simulink with no difficulty.
However, my problem is the vector must be sent conditionally, that is on the other side of simulation, there is a
system that I built which calculates the number of error in the vector; according to this result, my vector must be
either be refrained from transmitting or resumed to transmitting.
For some reason, I couldn't figure out which blocks to use and how to approach it.
Any help would be equally valuable!
Thanks

采纳的回答

Jacob Halbrooks
Jacob Halbrooks 2013-12-27
I would first suggest the Switch block in the Simulink Signal Routing library. This would allow you to switch between two signals (one being the workspace vector) based on a control port, which you could feed using the number of errors.
If the Switch block is not adequate, considering an Enabled or Triggered Subsystem from the Simulink Ports & Subsystems library. These would allow you to define a conditionally executed subsystem based on the number of errors as the control or trigger.

更多回答(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