How to go from frequency response of simple delay to impulse response.
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Rick Rosson
le 11 Sep 2014
Modifié(e) : Rick Rosson
le 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Multirate Signal Processing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!