clfftf.m
来自「Advanced Engineering Mathematics using M」· M 代码 · 共 21 行
M
21 行
function [FT,FTmag,FTang] = clfftf(ft,N,Ts)% CALL: [FT,FTmag,FTang] = clfftf(ft,N,Ts) Compute the DFT % approximation of the Fourier Transform % Inputs:% ft Sampled function of time f(nTs) % N Number of sample points% Ts Sample interval in seconds% Outputs:% FT Approximate Fourier transform using DFT% FTmag Magnitude of spectrum% FTang Phase in degrees% Determine the two-sided spectrumFT1=Ts*(fft(ft,N)); % Scale to approximate FTFT=fftshift(FT1); % Shift 0 to center %% Compute the magnitude and phase for the frequency values % in hertz fs=1/(N*Ts); fmax=1/(2*Ts)% FTmag=abs(FT); % MagnitudeFTang=(180/pi)*angle(FT); % Phase in degrees
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?