⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dm10402.m

📁 the code of the book come form the book of marlix laboratory with the book of singal
💻 M
字号:
% dm10402
% 傅里叶变换的尺度变换特性
t = 0.02;                                    %采样间隔
t = -2:dt:2;
f = Heaviside(t+1)-Heaviside(t-1);           %脉宽为2 的门信号
y = Heaviside(2*t+1)-Heaviside(2*t-1);       %脉宽为1的门信号
W1 = 5*pi*2;                                 %设定采样角频率                           
N = 500;                                     %采样点数
k = -N:N;
W = k*W1/N;                                  %对频率采样
F = dt*f*exp(-j*t'*W);                       %求F(w) 
Y = dt*y*exp(-j*t'*W);                       %求Y(w)
subplot(221);
plot(t,f);                                   %绘制f(t)
axis([-2 2 0 1.1]);
xlabel('t');ylabel('f(t)');
subplot(222);
plot(W,F);                                   %绘制F(w)
axis([-5*pi 5*pi -0.5 2.1]);
xlabel('\omega');ylabel('F(\omega)');
subplot(223);
plot(t,y);                                   %绘制y(t)
axis([-2 2 0 1.1]);
xlabel('t');ylabel('y(t)');
subplot(224);
plot(W,Y);  %绘制Y(w)
axis([-5*pi 5*pi -0.5 1.1]);
xlabel('\omega');
ylabel('Y(\omega)');
%End

⌨️ 快捷键说明

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