Use repmat() without increasing sample time in Simulink

조회 수: 2 (최근 30일)
Glo
Glo 2015년 7월 14일
편집: Glo 2015년 7월 14일
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개)

카테고리

Help CenterFile Exchange에서 String에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by