Using Matlab - plotting frequency responses

In summary, the task is to plot the log magnitude and phase of the frequency response 1 + 1/2*e^(-j*omega) using the freqz function in Matlab. The given equations are H(e^(j*omega) = 1 + 1/2*e^(-j*omega) and H(e^(j*omega) = (e^(j*omega) + 0.5)/(e^(j*omega)). The attempt at a solution involves using the linspace and freqz functions, and plotting the results using the subplot and plot functions. The provided link may be helpful for further assistance.
  • #1
Rareform
1
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
  • #2
Does this help at all?

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

1. What is Matlab?

Matlab is a high-level programming language and environment commonly used in scientific and engineering fields for data analysis, visualization, and numerical computation.

2. How do I plot frequency responses in Matlab?

To plot a frequency response in Matlab, you can use the freqz function. This function takes in the system’s coefficients as input and plots the magnitude and phase response of the system.

3. What is the frequency response of a system?

The frequency response of a system is a representation of how the system responds to different frequencies of input signals. It is a graph that shows the magnitude and phase of the output signal compared to the input signal at different frequencies.

4. Can I customize the plot of frequency responses in Matlab?

Yes, you can customize the plot of frequency responses in Matlab by changing the color, line style, and adding labels and titles using the appropriate functions such as plot and xlabel.

5. How can I use frequency responses in my analysis?

Frequency responses are useful in analyzing and understanding the behavior of systems such as filters, amplifiers, and control systems. They can also be used for designing and optimizing these systems for specific applications.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
955
  • Engineering and Comp Sci Homework Help
Replies
2
Views
826
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
Back
Top