Analog Communication
Analog Communication
fm=8;
am=0.7;
fc=80;
ac=1.7;
T=2/fm;
t=0:1/fs:T;
ma=am/ac;
message_signal=am*sin(2*%pi*fm*t);
subplot(3,2,1);
plot(t,message_signal);
xlabel("TIME");
ylabel("AMPLITUDE");
title("Message Signal");
cr_signal=ac*sin(2*%pi*fc*t);
subplot(3,2,2);
plot(t,cr_signal);
xlabel("TIME");
ylabel("AMPLITUDE");
title("Carrier Signal");
am_signal=(1+ma*message_signal) .*cr_signal;
subplot(3,2,3);
plot(t,am_signal);
title("Modulation Amplitude");
xlabel("TIME");
ylabel("AMPLITUDE");
fm=8;
Am=0.7;
fs=900;
T=2/fm;
t=0:1/fs:T;
em=Am*sin(2*%pi*fm*t);
subplot (3,1,1);
plot (t,em);
title ("Message_signal");
fc=80;
Ac=1.7;
ma=Am/Ac;
ec=Ac*sin(2*%pi*fc*t);
subplot (3,1,2);
plot (t,ec);
title ("Carrier_signal");
edsbsc=em .*ec;
subplot (3,1,3);
plot (t,edsbsc);
title ("DSBSC MODULATEDSIGNAL");
fc = 80;
fm =8;
fs = 900;
Am=0.7;
Ac =1.7;
t = 0:1/fs:2/fm;
b= 3.6;
em =Am*sin(2*%pi*fm*t);
ec = Ac*sin(2*%pi*fc*t);
efm= Ac*sin(2*%pi*fc*t- b*cos(2*%pi*fm*t));
subplot(3,1,1);
plot(t,em);
title("Messagesignal");
subplot(3,1,2);
plot(t,ec);
title("Carriersignal");
subplot(3,1,3);
plot(t,efm);
title("ModulatedFrequency");
clear;
clc;
clear;
//Mean Value
function X=f(x),
z=3*(1-x)^2,//Marginal Probability Density Function
X=x*z
endfunction a=0;
b=1;
EX=intg(a,b,f);//Mean value of X function Y=c(y)
z=3*(1-y)^2,//Marginal Probability Density Function
Y=y*z endfunction
EY=intg(a,b,c);//Mean value of Y disp(EX,"i)Mean of X =") disp(EY,"
Mean of Y =")
Variance
function X=g(x),
z=3*(1-x)^2,//Marginal Probability Density Function
X=x^2*z
endfunction a=0;
b=1;
EX2=intg(a,b,g);function Y=h(y)
z=3*(1-y)^2,//Marginal Probability Density Function
Y=y^2*z
endfunction EY2=intg(a,b,h);
vX2=EX2-(EX)^2;//Variance of X
vY2=EY2-(EY)^2;//Variance of Y
disp(vX2,"ii)Variance of X"); disp(vY2," Variance of Y")
Cross Correlation
G = 20
sigma = 20
Pr_min = 1e-12
f = 3e9
c = 3e8
lambda_ = c / f
R_values = np.zeros(len(Pt_values))
for i in range(len(Pt_values)):
Pt = Pt_values[i]
R_values[i] = R
for i in range(len(Pt_values)):
print(f"{Pt_values[i]:10.1f} {R_values[i]:10.2f}")
plt.figure(figsize=(10, 6))
plt.show()