Create a repeating matrix

    Jun 21 2013 | 8:46 pm
    Hi, I am trying to create a @planecount 1 @dim 1584 matrix where each 3 cell in sequence has the same random value. Something like: value0, value0, value0, value1, value1, value1, value2, value2, value2, ...
    I tried resizing the matrix without any interpolation, but it offsets at some point : the last value is not listed three times. Here is the code that shows the problem:

    • Jun 21 2013 | 9:10 pm
      This is a solution (for a final @dim 15), but there must be a better way!
    • Jun 21 2013 | 11:13 pm
      This doesn't address your question of why the resizing doesn't work as you expect, but here's a way of filling the matrix using uzi.
    • Jun 22 2013 | 3:12 am
      I was hoping to find a 1 or 2 object solution. The biggest «speed hump» in dataflows is the number of messages per operation.
    • Jun 22 2013 | 4:15 am
      The anomaly is due to some precision issues when upsampling the matrix. If you want exactly three repetitions, here are 2 options, one using jit.multiplex, the other jit.coerce: