I'm trying to merge two vector signals into one vector according to two sets of indices.
For example:
These indicate the 'indices' of the combined signal where each element of each of the two input vectors is intended to go.
One way to do this might be to use a selector block like this:
This achieves the result, but to get the the correct assignment of the elements as above, I need to provide the following index vector to the selector block:
These are the indices of the input vector, not the output vector—which I have in my two index vectors above.
Obviously I could use two assignment blocks instead, but it's a more complicated solution than the selector block and also requires a zeros vector of the correct size:
Also, I like that the selector block shows the connections graphically. This is important to me.
Is there an easy way I can use a selector block? Maybe by converting my index vectors perhaps.