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
运行结果: