📄 zfft.m
字号:
%FFT的变换结果
clc;clear all;close all;
t=0:0.001:0.6;
x=sin(2*pi*50*t)+sin(2*pi*120*t);
y=x+2*randn(size(t));
figure(1),plot(1000*t(1:50),y(1:50))
title('Singal Corrupted with Zero-Mean Random Noise')
xlabel('time (milliseconds)');
Y=fft(y,512);
Pyy=Y.*conj(Y)/512;
f=1000*(0:256)/512;
figure(2),plot(f,Pyy(1:257));
title('Frequency content of y');
xlabel('frequency(Hz)');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -