fs=900;
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
x= input ("type in the reference sequence=");
y= input ("type in the second sequence=");
n1=max(size(y))-1;
n2=max(size(x))-1;
r=corr(x,y,n1);
plot2d3('gnn',r)
clc;
clear all;
t=0:0.01:2*%pi;
x=sin(2*t);
subplot(3,2,1);
plot(x);
au=xcorr(x,x);
subplot (3,2,2);
plot (au);
v=fft(au);
subplot(3,2,3);
plot(abs(v));
fw=fft(x);
subplot(3,2,4);
plot(fw);
fw2=(abs(fw)).^2;
subplot(3,2,5);
plot(fw2);
import numpy as np
import matplotlib.pyplot as plt
G = 20
sigma = 20
Pr_min = 1e-12
f = 3e9
c = 3e8
lambda_ = c / f
Pt_values = np.array([0.1, 1, 10, 100, 1000, 10000, 100000])
R_values = np.zeros(len(Pt_values))
for i in range(len(Pt_values)):
Pt = Pt_values[i]
R = ((Pt * G**2 * lambda_**2 * sigma) / ((4 * np.pi)**3 * Pr_min))**(1/4)
R_values[i] = R
print("Transmitter Power (W) Radar Range (m)")
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.loglog(Pt_values, R_values, marker='o', linestyle='-', color='b')
plt.xlabel("Transmitter Power (W)")
plt.ylabel("Radar Range (m)")
plt.title("Radar Range vs Transmitter Power")
plt.grid(True, which="both", ls="--", linewidth=0.5)
plt.show()