Use repmat() without increasing sample time in Simulink

4 次查看(过去 30 天)
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!

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by