Answer to Question #183049 in Electrical Engineering for Rithu

Question #183049

Design a FIR digital differentiator. Arbitrarily choose the window function and number of samples. Plot the magnitude response.


1
Expert's answer
2021-04-22T07:23:03-0400

The code is as shown below

clc;

close all;

clear all;

% define n

n = 0:18;

N = 19; % N tap filter

M = (N-1)/2;

% define window

% define the filter

h = 1./((n-M)*pi).*sin((n-M)*pi/5).*blackman(19)'.*((n>=0)-(n>=N));

h(M+1) = 2/15; % this corresponds to n=1 where the denominator is zero

% plot the filter

figure;

stem(n,h,'filled');grid on;title('h[n]');

xlabel('n');ylabel('stem height');

% plot the frequency response of the filter

figure;

freqz(h,1);grid on;



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS