Professional Documents
Culture Documents
Wireless Communication Lab No-1
Wireless Communication Lab No-1
Lab no-1:
Q no_1(a):
Matlab code:
clc;
clear all;
t = -9:1:9;
for n = 1:1:9
y(n) = 3*t(n)^2+5;
end
for n = 10:1:9
y(n) = -3*t(n)^2+5;
end
plot(y)
output:
Q no_1(b):
Matlab codevectorization)
clc;
clear all;
t = -9:0.5:9;
m = (t>=0).*((-3*t.^2)+5);
n = (t<0).*((3*t.^2)+5);
y = m+n;
plot(y)
output:
Q no_3:
Matab code:
clc;
clear all;
x = [10,5,2,5];
n = length(x);
rms = ((sum(x.^2))/n)^(1/2);
rms;
output:
Q no_4:
Part a:
Output:
Part(b):