How to instantiate an array of simulink block ?

I'm trying to model multiple channels (hundreds) in Simulink. I've a library block for a channel. Now, how do I get hundred instances of the same channel (of-course, at different center frequencies). Center frequency is an input to the library block.

 Accepted Answer

Try the For Each subsystem where the input is an array of 100 center frequencies.

2 Comments

Jayawardan
Jayawardan on 19 Feb 2013
Edited: Jayawardan on 19 Feb 2013
Hi, this is what I was precisely looking for. Thank you. Can you also tell me, what is the variable for the index (index of each subsystem), to be used inside the For Each subsystem ? I'm tying to pass parameters by creating a mask. As the block I'm using doesn't have inputs. It accepts only parameters.
Unfortunately, it is currently not possible to iterate over parameters in a For Each subsystem - if possible, you should attempt to convert the parameter to an input (for example, a Gain block can be converted to a Multiply block, where the Gain value becomes an input instead of a parameter).

Sign in to comment.

More Answers (0)

Categories

Products

Community Treasure Hunt

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

Start Hunting!