db.m
来自「有关多相滤波的matlab的程序实现」· M 代码 · 共 14 行
M
14 行
%this funcion is to make FFT Discrete Fourier transform When N=1024
%then change into db form scale to the maxium point
%fs is the sampling frequency
%y is the input vector
%x is the cutpoint of fs
%dy is the spectrum of y in db form scale to the maxium point
function [x,dy]=db(fs,y)
N=1024;
Fy=fft(y,N);
Dy=20*log10(abs(Fy));
dy=Dy-max(Dy);
x=[0:fs/N:fs];
x=x(1:N)*1e-6;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?