📄 fft.m
字号:
t=-1:0.01:1;
x=0.7*sin(2*pi*50*t)+sin(2*pi*120*t);
y=x+randn(size(t));
N=length(x);
df=100/N;
n=0:N/2;
f=n*df;
fx=fft(x);
fy=fft(y);
figure(1)
subplot(211);plot(t,x);grid;
subplot(212);plot(f,abs(fx(n+1)*2/N));grid;
figure(2)
subplot(211);plot(t,y);grid;
subplot(212);plot(f,abs(fy(n+1))*2/N);grid;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -