MATLAB: Can I decimate a frame-based sequence in Simulink

downsampleframeSignal Processing Toolbox

I would like to decimate a frame sequence. For example, if I have a sequence of 10 frames, I would like to take 1st frame, throw the 2nd, take the 3rd, throw the 4th and so on and get a sequence of 5 frames. Is there a block that can achieve this?

Best Answer

You can decimate a frame sequence by first converting it to a sample-based data using a To Sample block, then decimate the sample-based signal using a Downsample block and convert the decimated signal back to frame-based signal using a To Frame block. This requires use of the "Frame Conversion" block in the Signal Management -> Signal Attributes library of the Signal Processing Blockset. This block can switch the frame flag off to act as a To Sample block and on to act as a To Frame block.
The model is attached which demonstrates decimation of a frame sequence by a factor of 2.