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

📄 discretesignals.m

📁 Self devrloped Demos for beginners of Matlab generate HTML report and enjoy
💻 M
字号:
%%
N=8192;
f0=0.1;
f1=0.2;
f2=0.3;
f3=0.5;
n=[0:8*pi];

x0=cos(2*pi*f0*n);
x1=cos(2*pi*f1*n);
x2=cos(2*pi*f2*n);
x3=cos(2*pi*f3*n);

X0=fft(x0,N);
X1=fft(x1,N);
X2=fft(x2,N);
X3=fft(x3,N);

F=[0:N-1]*1/N;

subplot(421)
stem(n,x0)

subplot(422)
plot(F,abs(X0))

subplot(423)
stem(n,x1)

subplot(424)
plot(F,abs(X1))

subplot(425)
stem(n,x2)

subplot(426)
plot(F,abs(X2))

subplot(427)
stem(n,x3)

subplot(428)
plot(F,abs(X3))

⌨️ 快捷键说明

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