flt.m
来自「经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助」· M 代码 · 共 28 行
M
28 行
%==================================================================
% Name: flt.m
% This program can be used to obvious the relationship
% between the zero-pole location and the time and frequency domain
% characteristics of the rectangular pulse.
%==================================================================
clear,close all;
a=-0:0.4:5;
b=-20:0.4:20;
[a,b]=meshgrid(a,b);
c=a+i*b; %确定绘图区域
c=(1-exp(-2*(c+eps)))./(c+eps);
c=abs(c); %计算拉普拉斯变换
subplot(2,1,1)
mesh(a,b,c); %绘制曲面图
surf(a,b,c);
view(-60,20) %调整观察视角
axis([-0,5,-20,20,0,2]);
title('The Laplace transform of the rectangular pulse');
%colormap(hsv);
w=-20:0.1:20;
Fw=(2*sin(w+eps).*exp(i*(w+eps)))./(w+eps);
subplot(2,1,2);plot(w,abs(Fw))
title('The Fourier transform of the rectangular pulse')
xlabel('frequence w')
%=========================================================
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?