DSP using MATLAB 示例Example3.1 3.2 3.3

Posted 沧海一粟

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DSP using MATLAB 示例Example3.1 3.2 3.3相关的知识,希望对你有一定的参考价值。

 

上代码:

w = [0:1:500]*pi/500;    % [0,pi] axis divided into 501 points.
X = exp(j*w) ./ (exp(j*w) - 0.5*ones(1,501));

magX = abs(X); angX = angle(X); realX = real(X); imagX = imag(X);

set(gcf,\'Color\',\'white\'); 
subplot(2,2,1); plot(w/pi,magX); grid on; 
title(\'Magnitude Part\');
xlabel(\'frequency in \\pi units\'); ylabel(\'Magnitude\'); 
subplot(2,2,3); plot(w/pi, angX); grid on;
title(\'Angle Part\');
xlabel(\'frequency in \\pi units\'); ylabel(\'Radians\');
subplot(\'2,2,2\'); plot(w/pi, realX); grid on;
title(\'Real Part\');
xlabel(\'frequency in \\pi units\'); ylabel(\'Real\');
subplot(\'2,2,4\'); plot(w/pi, imagX); grid on;
title(\'Imaginary Part\');
xlabel(\'frequency in \\pi units\'); ylabel(\'Imaginary\');

运行结果:

  

 

以上是关于DSP using MATLAB 示例Example3.1 3.2 3.3的主要内容,如果未能解决你的问题,请参考以下文章

《DSP using MATLAB》示例Example 6.20

《DSP using MATLAB》示例Example5.17

《DSP using MATLAB》示例Example5.18

《DSP using MATLAB》示例Example5.21

DSP using MATLAB 示例Example3.17

《DSP using MATLAB》示例Example 8.8