Use repmat() without increasing sample time in Simulink

1 Ansicht (letzte 30 Tage)
Glo
Glo am 14 Jul. 2015
Bearbeitet: Glo am 14 Jul. 2015
I am using Matlab function block to repeat my message 2 times. e.g u = [0 1 1 0]. Every bit has sample has time 5e-5s and the frame duration is 5e-5 * 4 = 20e-5s.
%u = [4X1]. %rep = [8X1] %repeat u 2 times in 1st dimension The code is:
rep = repmat(u,2,1);
Now, the problem is that when I use this function I get the correct repeated sequence, the output sample time is halved, i.e. Tb (bit sample time) = 2.5e-5s and Tf (frame duration) = 2.5*8 = 20e-5.
What I want is that the bit sample time should not change after the repmat operation, i.e. it should remain 5e-5s, and the frame duration changes according to reptition factor. e.g if the frame is repeated 2 times the frame duration is also doubled.
Any suggestions would be highly appreciated!

Antworten (0)

Kategorien

Mehr zu Communications Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by