Professional Documents
Culture Documents
Lab# 1
Obective:Generate sinusoid signal of frequency 1MHz,2MHz,10MHz & 50KHz
1MHz:t = 0:0.001:100;
A = 1;
f0=1e6;
s = A*sin(2*pi*f0.*t);
plot(t, s);
2MHz:
t = 0:0.001:100;
A = 1;
f1=2e6;
s = A*sin(2*pi*f1.*t);
plot(t, s);
[Type text]
Page 1
[Type text]
Page 2
t = 0:0.001:100;
A = 1;
f2=10e6;
s = A*sin(2*pi*f2.*t);
plot(t, s);
50KHz:
t = 0:0.001:100;
A = 1;
f3=50e3;
s = A*sin(2*pi*f3.*t);
plot(t, s);
[Type text]
Page 3
#02
Objective:-
n=-1:0.1:1;
subplot(3,1,1)
x=[zeros(1,10),1,zeros(1,10)];
stem(n,x)
xlabel('n')
ylabel('x[n]')
subplot(3,1,2)
n1=0:0.01:1;
r=0.5*n1.*(sign(n1)+1);
stem(n1,r)
xlabel('n')
ylabel('amplitude')
subplot(3,1,3)
t0=-3:0.05:-2;
x0=linspace(0,0,length(t0));
t1=-2:0.005:2;
x1=linspace(1,1,length(t1));
t2=2:0.05:3;
x2=linspace(0,0,length(t2));
g=[x0 x1 x2];
t=[t0 t1 t2];
plot(t,g)
xlabel('Time')
ylabel('Amplitude')
axis([-4 4 -1 2])
gridon
[Type text]
Page 4
Lab
[Type text]
Page 5
LAB#3
Objective:Generate Impulse ,Ramp & Unit gate function?
[Type text]
Page 6
[Type text]
Page 7
LAB#4
Objective:-
t=0:0.003e-3:1;
A=3;
fma=100;
fc=10000;
Max=A*sin(2*pi*fma*t);
dax=A*cos(2*pi*fc*t);
X=Max.*dax;
mod=X+(A*dax);
subplot(3,1,1)
plot(t,Max)
xlabel('time');
ylabel('amplitude');
title('Message signal');
subplot(3,1,2)
plot(t,dax)
xlabel('time');
ylabel('amplitude');
title('carrier signal');
subplot(3,1,3)
plot(t,mod)
xlabel('time');
ylabel('amplitude');
title('AM signal');
[Type text]
Page 8
[Type text]
Page 9