How to calculate the spectrum of the message w(t), the spectrum of the carrier c(t), and the spectrum of the received signal v(t), and the spectrum of the envelope?

2 次查看(过去 30 天)

time =0.33; Ts=1/10000; % sampling interval & time
t=0:Ts: time ; lent=length(t); % define a time vector
fm=20; fc =1000; c=cos(2* pi* fc*t); % define carrier at freq fc
w=10/lent *[1:lent]+cos(2* pi*fm*t); % create ”message” > −1
v=c . *w+c ; % modulate w/ large carrier
fbe=[0 0.05 0.1 1] ; % LPF design
damps=[1 1 0 0] ; f l =100; b=firpm( fl , fbe ,damps ); % impulse response of LPF
envv=(pi/2)* filter(b,1,abs(v)); % find envelope

Using this code, how do I find the spectrum of c(t), v(t), w(t), and envv.

回答(1 个)

Devineni Aslesha
Devineni Aslesha 2019-10-22
To calculate the spectrum of the carrier signal, use the ‘fft’ function as shown below. The same approach can be followed to calculate the spectrum of the envelope, message and received signals.
% Sampling frequency
fs = 10000;
cf = fft(c);
P2 = abs(cf/lent);
P1 = P2(1:lent/2+1);
f = fs*(0:(lent/2))/lent;
plot(f, P1);
title('Single sided Amplitude Spectrum of carrier signal');
Refer to the following doc for more details.

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by