denoise.m
来自「matlab 源程序」· M 代码 · 共 22 行
M
22 行
%example of Fourier transform of a signalt = 0:1e-2:10;%sinusoid signaly = cos(2*pi*t);%white Gaussian noisen = randn(1, length(y));%add noise to the signaly = y+n*2;%plot signal in the time domain, the signal is hardly perceivableplot(t, y);%take the Fourier transformf_y = abs(fft(y));%the frequency of the sinusoid signal is still significantly larger than%other frequency componentsplot((1:length(f_y))/length(f_y), f_y);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?