How do I stretch the time of a signal locally ?

조회 수: 15 (최근 30일)
farzad
farzad 2020년 12월 10일
댓글: farzad 2020년 12월 10일
Hi All
I have a signal that its time increment is 0.01 sec and the signal duration is 100 seconds. I want to stretch and increase the time increment from time 50 sec to 55 sec from 0.01 sec to 0.5 sec. apparently this will affect the values of the successive time values and the total time duration.
what is the algorithm to do this ?

답변 (1개)

Amir RF
Amir RF 2020년 12월 10일
Hello Dear Farzad,
If I understand your question correctly, your original signal is a 100 sec signal and you want to expand some part of this signal. First you can slice your original signal such as
interested_vector = original(50:0.5:55);
Then you should insert this part in the right place:
result = (original(0:50) interested_vector original(55:end));
I hope this gives you some idea to do what you want.
Best,
  댓글 수: 1
farzad
farzad 2020년 12월 10일
Thank you , but there is a problem
the
original(55:end)
will not start from 55 since the interested vector , which is the part from 50 to 55 , will not be 5 seconds after expansion and will be
5* 0.5/0.01 = 50 seconds
so the first part of the series is 49.99 seconds, then 50 to 100 seconds in the middle and then the rest of the time

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

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by