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?

조회 수: 3 (최근 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에서 Get Started with Signal Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by