logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Bryan CoxxEconomics
(5/5)

909 Answers

Hire Me
expert
Piper SharpMathematics
(5/5)

901 Answers

Hire Me
expert
Francis OrtizPsychology
(5/5)

515 Answers

Hire Me
expert
Witi HydeGeneral article writing
(5/5)

951 Answers

Hire Me
MATLAB
(5/5)

Write a function FIR_freq_resp_single that computes the frequency response hfd for a given impulse response h[n] and a given frequency fd.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Part 1:

Write a function FIR_freq_resp_single that computes the frequency response hfd for a given impulse response h[n] and a given frequency fd. Start your function implementation as follows function H — FIR_freresp_single(h, f d)  % FIR_freqresp_single - compute frequency response from impulse  response at single frequency  

% H — FIR_freq_resp_single(h, fd)

% Input Variables:

% h - vector, samples of the impulse response of the filter

% fd — scalar, normalized frequency to compute frequency

response at (0 <= fd < 0.5)

% Output Variable:

% H - complex scalar, frequency response at frequency fd

Verify that your function works correctly using the following test script. The total error you observe must be very, very close to zero.

%% Test case: 3-pt averager

% expected values at four frequencies

f = [0, 1, 2, 3)16;

expected — [1, 2/3*exp(—lj*pi/3), 0, 1/3];

% coefficients for 3-py averager

M — 3;

b = ones(1, 3)13;

$ compute sum of absolute errors — should be very close to zero

sum_errors — 0;

for n = 1:4

sum_errors += abs(expected(n) - FIR_freq_resp_single(b, f(n)));

end

printf (“Total absolute error: %g”, sum_errors)

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme