DSP using MATLAB 示例Example2.3

DSP using MATLAB 示例Example2.3

n = [-10:1:10]; alpha = -0.1+0.3j;                %
x = exp(alpha*n); % subplot(2,1,1);
set(gcf,'Color',[1,1,1]) % 改变坐标外围背景颜色
stem(n,real(x)); title('real part'); xlabel('n');
grid on
figure
set(gcf,'Color','white') % 新生成一张图
stem(n,imag(x)); title('imaginary part'); xlabel('n'); %ylabel('x2(n)');
grid on
figure
set(gcf,'Color','white')
stem(n,abs(x)); title('magnitude part'); xlabel('n');
grid on
figure
set(gcf,'Color','white')
stem(n,(180/pi)*angle(x)); title('phase part'); xlabel('n');
grid on

运行结果:

DSP using MATLAB 示例Example2.3 

DSP using MATLAB 示例Example2.3

DSP using MATLAB 示例Example2.3

DSP using MATLAB 示例Example2.3

上一篇:DSP using MATLAB 示例Example2.4


下一篇:struts(三) ---OGNL的学习和理解