フィルターのクリア

How to go from frequency response of simple delay to impulse response.

1 回表示 (過去 30 日間)
Jim
Jim 2014 年 9 月 11 日
編集済み: Rick Rosson 2014 年 9 月 11 日
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.

採用された回答

Rick Rosson
Rick Rosson 2014 年 9 月 11 日
編集済み: Rick Rosson 2014 年 9 月 11 日
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 件)

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by