sfunction with mux as input - detecting number of muxed signals
Show older comments
Hello,
I'm trying to solve my problem for a good couples of hours now and I don't think it can be too difficult...
I'm having a sfunction with 2 input ports and 1 output port.
The first input port is just a signal. Let's assume it's a constant. The second input port is a number of signals which are fed in via a mux-block.
In the sfunction the signals of the second input port shall be multiplied by the constant which is fed in via the first input port.
The output port has the same number of signals as the second input port as it's just supposed to return all the multiplied signals in the same order.
Now the size of the muxed input (and thus output) doesn't change while the model is executed but it changes quite a lot while developing it. In order to not having to detect the number of signals which are fed into the sfunction via the mux block, I want the sfunction to detect it automatically. And that's were my problem lies...
I hope my problem is understandable. Thanks in advance.
Cheers, Seb
Answers (0)
Categories
Find more on Event Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!