Simple Frequency Response Function

5 ビュー (過去 30 日間)
Jonathan Medina
Jonathan Medina 2020 年 2 月 22 日
編集済み: Jonathan Medina 2020 年 2 月 22 日
I am trying to make a function that outputs the following frequency response of an FIR system:
where b is a vector of filter coefficients, w is a vector of angular frequencies, and output H is a complex-valued frequency response. I think I need a for loop to account for the summation, but I am not sure how to go about this (I am a MATLAB novice).
Thanks!

採用された回答

Jonathan Medina
Jonathan Medina 2020 年 2 月 22 日
編集済み: Jonathan Medina 2020 年 2 月 22 日
I think I figured it out. Any comments/suggestions would be appreciated.
function H = FreqResponse(b,w)
% This function inputs a vector b of filter coefficients and a vector w of
% angular frequencies and outputs a complex-valued frequency response H.
H = zeros(length(b),1);
for k = 1:length(b) %index for filter coeff's
H = H + b(k) * exp(-1j*w*k); %given frequency response
end
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDigital Filter Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by