With a half wave rectifier this is what the system produces
With a half wave rectifier, this is what the system produces:
If the system is modified to simulate a full-wave rectifier envelope detector instead of half-wave, please answer the following question:
- Comment on the time-domain signal y(t): how has the output signal changed as a result
of using a full-wave rectifier?
- Comment on the frequency-domain signals: how has the spectrum of both Srect(f) and
Y (f) changed as a result of using the full-wave rectifier?
Thank you!
Solution
% Sinusoidal signal with amplitude of 5 and freq of 300Hz
y=5*cos(2*pi*300*t);
% time vector for it to extend over
t=0:0.0001:.1;
% plot and axis properties
plot(y)
xlabel(\'time\');
ylabel(\'amplitude\');
axis([0 100 -5 5]);
title(\'Graph of function\');
Mat lab Code and graph for hello.wav:
y = wavread(\'hello.wav\');
plot(y);
xlabel(\'time\');
ylabel(\'amplitude\');
title(\'hello.wav\');
Matlab Code and Plots:
[y,Fs] = wavread(\'hidden.wav\');
plot(y);
L=length(y); % # of samples
Ts=1/Fs; %sampling period
tt=Ts*L; % total time
t=Ts:Ts:tt;
% occurs at f=300
y2 = y\'-cos(2*300*pi*t);
plot(y2)
sound(y2,Fs)
[y,Fs] = wavread(\'hidden2.wav\');
y2 = fliplr(y\');
sound(y2,Fs)
plot(y2)

