|
Contents | Previous | Next | Subchapters |
| Syntax |
[a, b] = lombft(t, z, f) |
| See Also | dft , fft |
{ (t , z ): j = 1, ... , N }
j j
where t and z are column vectors with length N.
The vector t is integer, real, or double-precision and
z is integer, real, double-precision or complex.
The column vector f is integer, real, or double-precision
and all of its elements are greater than zero.
The Lomb-Fourier transform
solves the following problem:
N 2
--- | 2 pi i f(j) t(j) |
zhat(f ) = argmin > | z - (a + i b) * e |
j (a + i b) --- | j |
j=1
where i denotes the square root of minus one.
The return values a and b
are double-precision column vectors
with the same length as f and such that
zhat(f ) = a(f ) + i b(f )
j j j
#
clear
#
ranseed
N = 100
Tmax = sqrt(double(N))
f0 = sqrt(double(N))
t = Tmax * rand(N, 1)
z = sin(2 * PI * f0 * t)
f = seq(N / 2)
#
[a, b] = lombft(t, z, f)
gplot(f, a^2 + b^2)
gxaxis("log")
gtitle("Lomb-Fourier Transform Squared")