How to concatenate array of signal values in a for loop block in simulink with himself Indefinite number of times

15 views (last 30 days)
trying to do the concatenation with for-loop block in simulink model using :
  • for loop ietrator block (iterates for N loops (N=16 but can variate depends on other outside calculations))
  • matrix concatenation block
  • delay block
Each iteration get 1x4 binairy values as an array, as output from tghe subsystem reference block (here for example [1 0 1 1] )
this is repeated N = 6 times, each iteration will get different [x1 x2 x3 x4] array binary values, to be concatenated to previous ones ( [1 0 1 1 x1 x2 x3 x4] etc )
and so on until iteration n = 16 : we will get [ 1 0 1 1 ..... 1 0 0 1] a 1x16 binary values array
i get the error :
Unable to determine signal dimensions. There is a loop consisting of 'Hex2Bin_2022_Lab2/For Iterator Subsystem/Delay1' that cannot be resolved because signal dimensions are defined by a cyclic relationship
here is the snapshot of the model :
  4 Comments

Sign in to comment.

Answers (1)

Graham Cotgreave
Graham Cotgreave on 27 Sep 2022
Had the same issue, resorted to the following, which is not much use for a larger number of values, but it did mean I could add a subsystem into the loop and get a vector answer.
It appears that the single Z-1 and a concatenator has the problem that it wants to concatonate at time zero, and not act like an empty FIFO as hoped.

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!