contfft.m
来自「经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助」· M 代码 · 共 18 行
M
18 行
function [X,w] = contfft(x,T);
% CONTFFT [X,w] = contfft(x,T)
%
% Computes the Fourier transform of a continuous time signal
% using the FFT. The input is the sampled continuous
% time signal x and the sampling time T. The output is
% the Fourier transform X(w) and the frequency vector w.
%
[n,m] = size(x);
if n<m,
x = x';
end
Xn = fft(x);
N = length(x);
n = 0:N-1;
n(1) = eps;w = 2*pi*n/N/T;
X = (1-exp(-j*2*pi*n/N))./(j*2*pi*n/N/T).*Xn.';
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?