필터 지우기
필터 지우기

How we can give Delay in a clock ?

조회 수: 3 (최근 30일)
Sarfaraz Ahmed
Sarfaraz Ahmed 2018년 11월 5일
댓글: ritu rai 2019년 2월 16일
Hi. I am using "Delayseq" function in MATLAB function block using simulink. But it doesn't provide delay in a clock. I cannot use ideal fixed unit delay block because, I need variable delay and later I have to adjust that delay. therefore, I am using this customized function. but it's not giving delay in a clock.
shifted_signal = delayseq(u,0.004,250);
here, I am giving delay 4ms and sampling frequency is 250. I set 250 because in clock generation block I set sampling time =4ms.
I attached the snaps please have a look and help in this regard. I really need help for this work. if anyone help it would be appreciated. Thanks

채택된 답변

Honglei Chen
Honglei Chen 2018년 11월 5일
delayseq works on a vector, e,g.,
>> delayseq([1;0;1;0;1;0;1;0;1;0],0.004,250)
>> ans =
0
1
0
1
0
1
0
1
0
1
while if I under your model correctly, the pulse samples are generated one at a time, that's why the function is not providing the correct answer. You can consider adding a buffer in between to convert the signal to vector, but then you need to live with the fact that there is a latency due to the buffering at the output.
HTH
  댓글 수: 13
Sarfaraz Ahmed
Sarfaraz Ahmed 2018년 11월 22일
편집: Sarfaraz Ahmed 2018년 11월 22일
Thanks Chen, I will try this . Let see if it works in my aplication.
Thanks for such kind of supporting.
ritu rai
ritu rai 2019년 2월 16일
hi,
I am facing the same problem. I want to provide variable time delay to a sawtooth signal using matlab function block. Please help in this regard.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Transmitters and Receivers에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by