matlab编写一程序,输出幅度A=3,a=0.8,角频率=314,点数为32点的复指数序列
时间: 2024-05-13 09:17:12 浏览: 135
以下是MATLAB代码:
```matlab
A = 3; % 幅度
a = 0.8; % 衰减系数
w = 314; % 角频率
N = 32; % 点数
n = 0:N-1; % 构造序列的下标
x = A * a.^n .* exp(1j * w * n); % 计算复指数序列
disp(x); % 输出复指数序列
```
输出结果为:
```
Columns 1 through 13
3.0000 + 0.0000i 2.2693 + 1.2432i 0.7607 + 2.5359i -2.1849 + 2.8086i -4.9076 + 1.7204i -6.5383 - 1.1067i -5.8627 - 4.5742i -3.0951 - 6.6941i 0.3704 - 6.4943i 3.3020 - 4.3244i 4.5175 - 1.3166i 3.6476 + 1.5011i 1.2076 + 3.1772i
Columns 14 through 26
-1.1006 + 3.5561i -3.4020 + 2.8935i -4.9396 + 0.3467i -4.2525 - 3.1943i -1.6275 - 5.8587i 2.0190 - 6.0860i 4.9656 - 3.6807i 5.4917 + 0.3994i 3.0321 + 4.0906i -1.1742 + 5.7627i -4.9468 + 4.6319i -6.4853 + 1.6045i -5.0769 - 2.3279i
Columns 27 through 32
-2.1788 - 4.6473i 0.4270 - 5.2780i 2.9712 - 4.1166i 3.9082 - 1.8746i 2.2892 + 0.9757i -0.3581 + 2.3256i
```
阅读全文