fftΒΆ
The fft function computes the complex Fourier Transformation.
- cvFFT = fft(cv)
Return Value
cvFFT is the result of the Fourier Transformation of cv.
Parameters
- cv
cv is a real or complex vector.
Comment
If cv is a matrix, all columns will be transformed parallelly.
Example
def Spectrum(signal, rsAbtastfrequenz)
{
S = fft(signal);
nS = len(S)/2;
w = (0:(nS-1))/nS * rsAbtastfrequenz/2;
return [w', abs(S[1:nS])'];
}
Fs = 100;
t = (1:100)/Fs;
s1 = sin(2*PI*t * 5);
s2 = sin(2*PI*t * 15);
s3 = sin(2*PI*t * 30);
s = s1+s2+s3;
plot(t,s);
rmXY = Spectrum(s, Fs);
plot(rmXY[;1], rmXY[;2]);
See also
id-2041055