Using Matlab - plotting frequency responses

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
Rareform
Messages
1
Reaction score
0

Homework Statement



I am asked to plot the log magnitude and phase of the frequency response 1 + 1/2*e^(-j*omega). I am told to use the freqz function for this problem. I have tried using the help freqz feature in Matlab but I haven't been able to work it out.

Homework Equations



H(e^(j*omega) = 1 + 1/2*e^(-j*omega)

H(e^(j*omega) = (e^(j*omega) + 0.5)/(e^(j*omega))


The Attempt at a Solution



omega=linspace(0,pi,1024);
[H,W] = freqz(0.5,1,512);
subplot(2,1,1);
plot(omega,abs(H))
title('Log Magnitude (6.39a)');
subplot(2,1,2);
plot(omega,angle(H))
title('Phase (6.39a)');
 
Physics news on Phys.org
Does this help at all?

http://www.mathworks.com/help/toolbox/signal/freqz.html
 
Last edited by a moderator: