doc ffft
Documentation of the ffft function.
helpFun('ffft')
Fast Finite Fourier Transform
Y = FFFT(X)
Description
Fourier transform of an input signal.
Input parameters
X [double(:inf x 1)] is the input signal.
Output parameters
Y [double(:inf x 1)] is the Fourier-transformed signal
Example
% Sampling frequency
Fs = 1000;
% Sampling period
dt = 1/Fs;
% Length of signal
L = 6000;
% Time vector
t = (0:L-1)'*dt;
% Signal
S = 0.7*sin(2*pi*50*t) + sin(2*pi*120*t);
xgtt = S + 2*randn(size(t));
% Apply the fft function of Matlab
NFFT = 2^nextpow2(L);
FASsignal=fft(xgtt,NFFT)*dt;
% Apply the fft function of OpenSeismoMatlab
FASsignal3=ffft(xgtt)*dt;
% Difference between results
max(abs(FASsignal-FASsignal3))
__________________________________________________________________________
Copyright (c) 2018-2022
George Papazafeiropoulos
Major, Infrastructure Engineer, Hellenic Air Force
Civil Engineer, M.Sc., Ph.D.
Email: gpapazafeiropoulos@yahoo.gr
_________________________________________________________________________