ch3example11prg1.m

来自「清华大学出版社 邵玉斌编写的《通信系统建模与仿真实例分析》一书的所有MATLAB」· M 代码 · 共 11 行

M
11
字号
% ch3example11prg1.m
t=-1: 0.01 :10 ;                    % 计算时间范围
f_t=exp(-t).*(t>0);
subplot(3,1,1);plot(t,f_t);         % 时域波形
axis([-1 10 -0.1 1.1]); xlabel('time (sec)');
w=-40: 0.1 : 40;                    % 计算角频率范围
F_w=1./(1+j*w);                     % 频谱理论结果
subplot(3,1,2);plot(w, abs(F_w));   % 频域幅度谱
axis([-40 40 0 1.1]);xlabel('freq (rad/s)');
subplot(3,1,3);plot(w, angle(F_w)); % 频域相位谱
axis([-40 40 -pi/2 pi/2]);xlabel('freq (rad/s)');

⌨️ 快捷键说明

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