dht
-
constexpr std::vector<Complex> dht(const std::vector<Complex> &X, int type = 2) noexcept
Calculates the discrete Hilbert transform [1] of a complex sequence.
Parameters
Returns
Cpplex extends the Hilbert transform to accept complex sequences using the method described here [2].
Example
std::vector<Complex> X = {1 + 2_j, 2 + 3_j, 3, 4, 5};
std::vector<Complex> Y = dht(X);
for(int i = 0; i < Y.size(); i++){
std::cout << Y[i] << "\n";
}
Output:
1.7013 - 1.84661j
-1.37638 + 1.23107j
-0.649839 + 1.55599j
-1.37638 - 0.145309j
1.7013 - 0.795148j
References