Hi guys! I have a problem composing a vector using switch, if the inputs have different size!
I want to achieve a vector A-B-C-D, but some of the numbers are shifted…
I’m thinking some work-around, but all looking poor efficency. Any ideas?
SwitchDifferentBin.v4p (9.7 kB)
since switch internally does not know anything about bins, it applies standard slicewise behaviour and repeats. that’s why you get the ‘shifting’
after 3 slices of input B you switch to 2 slices of input A
so input A gets repeated until it matches the necessary count and thus looks like this |1,2,1,2,1| and there you take the last 2 ones.
attached a solution with getslice
SwitchDifferentBin.v4p (9.1 kB)
fuck yeah! I’m realizing I did’t got hoe the binsize works…
BTW thanks bro!