%% Single-Sideband Amplitude Modulation
% Generate a 10 Hz sinusoidal signal sampled at a rate of 200 Hz for 1 second. Embed the sinusoid in white Gaussian noise of variance 0.01.

fs = 200;
t = 0:1/fs:1;
x = sin(2*pi*10*t) + randn(size(t))/10;

%
% Single-sideband amplitude modulate the signal with a carrier frequency of 50 Hz. Compute and display the new Welch's power spectral density estimates.

y = modulate(x,50,fs,'amssb');

pwelch([x;y]',hamming(100),80,1024,fs,'centered')

% Copyright 2018 The MathWorks, Inc.