If all input arguments are arrays of the same size, then
If one input is a scalar and the others are arrays of the same size, then
htrans expands the scalar into an array of the same size.
f is an array of symbolic expressions with different
independent variables, then
var must be a symbolic array with
elements corresponding to the independent variables.
Compute the Hilbert transform of
sin(t). By default, the transform returns a function of
syms t; f = sin(t); H = htrans(f)
Compute the Hilbert transform of the
sinc function, which is equal to
sin(πx)/πx. Express the result as a function of
syms f(x) H(u); f(x) = sinc(x); H(u) = htrans(f,u)
sinc function and its Hilbert transform.
fplot(f(x),[0 6]) hold on fplot(H(u),[0 6]) legend('sinc(x)','H(u)')
Create a sine wave with a positive frequency in real space.
syms A x t u; assume([x t],'real') y = A*sin(2*pi*10*t + 5*x)
Apply a –90-degree phase shift to the positive frequency component using the Hilbert transform. Specify the independent variable as
t and the transformation variable as
H = htrans(y,t,u)
Now create a complex signal with negative frequency. Apply a 90-degree phase shift to the negative frequency component using the Hilbert transform.
z = A*exp(-1i*10*t)
H = htrans(z)
Create a real-valued signal with two frequency components, 60 Hz and 90 Hz.
syms t f(t) F(s) f(t) = sin(2*pi*60*t) + sin(2*pi*90*t)
Calculate the corresponding analytic signal using the Hilbert transform.
F(s) = f(s) + 1i*htrans(f(t),s)
Calculate the instantaneous frequency of using
where is the instantaneous phase of the analytic signal.
InstantFreq(s) = diff(angle(F(s)),s)/(2*pi); assume(s,'real') simplify(InstantFreq(s))
Input, specified as a symbolic expression, symbolic function, symbolic vector, or symbolic matrix.
var— Independent variable
Independent variable, specified as a symbolic variable, symbolic vector, or symbolic
matrix. This variable is usually in the time domain. If you do not specify the variable,
t by default. If
f does not contain
htrans uses the function
symvar to determine
the independent variable.
transVar— Transformation variable
H— Hilbert transform of
htrans cannot transform the input function, it returns an
unevaluated call. To return the original expression, apply the inverse Hilbert transform
to the output by using
The Hilbert transform H = H(x) of the expression f = f(t) with respect to the variable t at point x is
Here, p.v. represents the Cauchy principal value of the integral. The function f(t) can be complex, but t and x must be real.
To compute the inverse Hilbert transform, use
ihtrans. The Hilbert
transform of a function is equal to the negative of its inverse Hilbert transform.
For a signal in the time domain, the Hilbert transform applies a –90-degree phase shift to positive frequencies of the corresponding Fourier components. It also applies a 90-degree phase shift to negative frequencies.
For a real-valued signal
a, the Hilbert transform
htrans(a) returns its harmonic conjugate
b. The real signal
a = real(z) and its Hilbert transform
b = imag(z)
form the analytic signal
z = a + 1i*b.