fzsxl.m

来自「the code of the book come form the book 」· M 代码 · 共 16 行

M
16
字号
function fzsxl(n1,n2,a,w)
%n1:绘制波形的复指数序列的起始时间序号
%n2:绘制波形的复指数序列的终止时间序号
%w:复指数序列的角频率
%a: 复指数序列的底数
n=n1:n2;
x=(a*exp(i*w)).^n;
Xr=real(x);
Xi=imag(x);
Xa=abs(x);
Xn=angle(x);
subplot(2,2,1), stem(n,Xr,'filled'),title('实部'),xlabel('n');
subplot(2,2,3), stem(n,Xi,'filled'),title('虚部');xlabel('n')
subplot(2,2,2), stem(n,Xa,'filled'),title('模');xlabel('n')
subplot(2,2,4), stem(n,Xn,'filled'),title('相角');xlabel('n')

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?