This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Analytic Signal for Cosine

This example shows how to determine the analytic signal. The example also demonstrates that the imaginary part of the analytic signal corresponding to a cosine is a sine with the same frequency. If the cosine has a nonzero mean (DC shift), then the real part of the analytic signal is the original cosine with the same mean, but the imaginary part has zero mean.

Create a cosine with a frequency of 100 Hz. The sampling frequency is 10 kHz. Add a DC offset of 2.5 to the cosine.

t = 0:1e-4:1;
x = 2.5+cos(2*pi*100*t);

Use the hilbert function to obtain the analytic signal. The real part is equal to the original signal. The imaginary part is the Hilbert transform of the original signal. Plot the real and imaginary parts for comparison.

y = hilbert(x);

hold on
xlim([0 0.1])
grid on
text([0.015 0.015],[3.7 1.2], ...
    {'Real Part \downarrow';'Imaginary Part \downarrow'})

You see that the imaginary part is a sine with the same frequency as the cosine real part. However, the imaginary part has a mean of zero, while the real part has a mean of 2.5.

The original signal is

The resulting analytic signal is

Plot 10 periods of the complex-valued analytic signal.

prds = 1:1000;


ylabel('Re \{z(t)\}')
zlabel('Im \{z(t)\}')
axis square

See Also

Was this topic helpful?