How to go from frequency response of simple delay to impulse response.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Jim
am 11 Sep. 2014
Bearbeitet: Rick Rosson
am 11 Sep. 2014
Lets say my transfer function is H(f)=exp(-j2pi*f*tau) where tau is delay in seconds. In time domain we know H(f) is h(t)=δ(t-tau) . How do I show this in MATLAB? Below is what I have tried using codes that were related to this question.
clear all
N=1000; f=1:1:1000; tau=5; H=exp(-1i*2*pi.*f*tau); FR_positive_frequency_only=H; FR_data = zeros(1,2*N); FR_data(1:N) = FR_positive_frequency_only; FR_data(N+1:N*2) = fliplr(FR_positive_frequency_only(1:end));
IR_data = ifft(FR_data); figure; stem(IR_data);
IR_data=ifft(ifftshift(FR_data)); figure; stem(IR_data);
Thank you for the help.
0 Kommentare
Akzeptierte Antwort
Rick Rosson
am 11 Sep. 2014
Bearbeitet: Rick Rosson
am 11 Sep. 2014
Fs = 2000;
N = 12000;
dF = Fs/N;
f = (-Fs/2:dF:Fs/2-dF)';
tau = 5;
H = exp(-1i*2*pi*f*tau);
h = real(ifft(ifftshift(H)));
dt = 1/Fs;
t = dt*(0:N-1)';
plot(t,h);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!