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

📄 alias_2.m

📁 This program illustrates the effect of alising of frequency leading to signal distortion,the outpu
💻 M
字号:
Ts1 = 0.05; Ts2 = 0.1; Ts3 = 2/3;
w1 = 2*pi*1;
t = [0:0.005:3];
x = sin(w1*t+0.25);
figure(1),clf,plot(t,x),grid,xlabel('Time (s)'),ylabel('Amplitude')
title('Continuous-Time Signal (frequency of 1 Hz)');
t1 = [0:Ts1:3];
xs1 = sin(w1*t1+0.25);
figure(2),clf,stem(t1,xs1);grid,hold on,plot(t,x,'r:'),hold off,
xlabel('Time (s)'),ylabel('Amplitude')
title('Sampled Version of x(t) with T_s = 0.05 s')
t2 = [0:Ts2:3];
xs2 = sin(w1*t2+0.25);
figure(3),clf,stem(t2,xs2);grid,hold on,plot(t,x,'r:'),hold off
xlabel('Time (s)'),ylabel('Amplitude')
title('Sampled Version of x(t) with T_s = 0.1 s')
t3 = [0:Ts3:3];
xs3 = sin(w1*t3+0.25);
yy = spline(t3,xs3,t);
figure(4),clf,stem(t3,xs3);grid,hold on,plot(t,x,'r:',t,yy,'b--'),hold off
xlabel('Time (s)'),ylabel('Amplitude')
title('Sampled Version of x(t) with T_s = 2/3 s')

⌨️ 快捷键说明

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