Ploting Rayleigh faded signal copies
Afficher commentaires plus anciens
Hello everyone, I am looking for a way to sum a Rayleigh faded sine wave with its delayed Rayleigh faded version. I am trying to plot them in figure and to plot the original signal in another one to see the difference. I want to plot both of them versus time not only the original signal as in the figure.

c1 = rayleighchan(1/1600,100);
%c1.PathDelays = [0 1e-6];
%%Time specifications:
Fs = 1600; % samples per second
dt = 1/Fs; % seconds per sample
StopTime = 62.5; % seconds
t = (0:dt:StopTime-dt)'; % seconds
%Sine wave
Fc = 1; % hertz
sin = cos(2*pi*Fc*t);
% Plot the signal versus time:
figure (6);
%subplot (2,2,1)
%plot(t,sin);
%xlabel('time (in seconds)');
% title('Signal versus Time');
% zoom xon;
%subplot(2,2,2)
sin1 = filter (c1,sin);
% plot (t,10*log10 (abs(sin1)));
%subplot(2,2,3)
plot (t,sin1);
xlabel('time (in seconds)');
title('Signal versus Time');
% now shift the signal in time by zeropadding at the beginning:
tau = 802*dt;
y = [ tau ; sin1 ];
% Also, let's zeropad x at the end so that it has the same length as y:
sin1 = [ sin1 ; tau ];
% Create a simple time domain:
n = (1:size(z,1))';
z = sin1 + y;
% plot both signals:
figure(2);
plot(n,z,'r');
legend('z');
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Propagation and Channel Models dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!