Using Matlab - plotting frequency responses

Click For Summary
SUMMARY

The discussion focuses on using MATLAB's freqz function to plot the log magnitude and phase of the frequency response defined by the equation H(e^(j*omega) = 1 + 1/2*e^(-j*omega). The user successfully generates the frequency response using the command [H,W] = freqz(0.5,1,512) and plots the results with subplot for both log magnitude and phase. The provided MATLAB code effectively demonstrates the plotting process, confirming the utility of the freqz function for this type of analysis.

PREREQUISITES
  • Familiarity with MATLAB programming environment
  • Understanding of frequency response concepts
  • Knowledge of complex numbers and their representation
  • Experience with MATLAB plotting functions
NEXT STEPS
  • Explore MATLAB's help freqz documentation for advanced usage
  • Learn about linspace for generating linearly spaced vectors in MATLAB
  • Investigate the subplot function for creating multi-plot figures
  • Study the implications of phase and magnitude in signal processing
USEFUL FOR

Students and professionals in signal processing, MATLAB users looking to visualize frequency responses, and engineers working on control systems or communications.

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:

Similar threads

Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K