One could decompose the signal into a product of two simpler signals:
x(t) = m(t) sin(2 pi f0 t)The message signal m(t) is a sequence of rectangular pulses. Each rectangular pulse is scaled by either +1 or -1. An amplitude of +1 could represent a bit of value '1', and an amplitude of -1 could represent a bit of value '0'. The message signal contains 1 bit each 1 ms, i.e. 1000 bits/s.
The cosine term has fixed frequency f0, which is the inverse of the fundamental period of the cosine.
g[n] = 10 cos(w1 n) cos(w2 n)where w1 = (2 pi / 20) rad/sample and w2 = (2 pi / 4) rad/sample. When two cosines are multiplied together, the resulting signal has frequencies of w2 + w1 and w2 - w1 due to following trigonometric formula (see page 886 in Appendix A):
cos(x) cos(y) = 1/2 ( cos(x-y) + cos(x+y) )The new frequencies are
w2 + w1 = (2 pi / 4) + (2 pi / 20) = 12 pi/20 = 2 pi (3/10)
w2 - w1 = (2 pi / 4) - (2 pi / 20) = 8 pi/20 = 2 pi (1/5)The signal g[n] has a fundamental period of 10 samples. By plotting 20 samples of g[n], two periods should be visible.
Here is sample Matlab code to plot g[n]:
n = 1:20; g = 10*cos(2*pi*n/20).*cos(2*pi*n/4); stem(n, g);Please notice the pointwise multiplication operation ".*".