필터 지우기
필터 지우기

Time delay for time domain function?

조회 수: 2 (최근 30일)
ckchew
ckchew 2011년 7월 2일
Hellow there everyone...i am new to matlab and i have some enquiry regarding time delay...let's say i have a .wav file which consists of my voice (will be using wavread to read the wav file). is there any way i can implement a time delay like for instance:
original signal s(t) delayed version s(t-T), where T=delay
any ideas for implementing s(t-T)? any help or advice will be greatly appreciated!

채택된 답변

Rick Rosson
Rick Rosson 2011년 7월 2일
Please try the following:
filename = 'myvoice.wav';
[ x Fs ] = wavread(filename);
[M,N] = size(x);
T = 0.2;
D = Fs*T;
y = [ zeros(D,N) ; x ] ;
x = [ x ; zeros(D,N) ] ;
dt = 1/Fs;
t = dt*(0:M-1)';
figure;
plot(t,x, t,y);
HTH.

추가 답변 (1개)

ckchew
ckchew 2011년 7월 2일
Hello there Rick! you're using the principle of zero padding to implement the time delay? that's ingenius! Thank you so much for the idea and code, it really helped a lot!:) have a pleasant day ahead!^^

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by