You are on page 1of 3

EXPERIMENT 1(a)

clc;
clear all
close all
t=-1:.01:1;
T=.2
y= sin(2*pi*t/T);
subplot(3,3,1)
plot(t,y)
title('sin wave')
xlabel ('time') ,ylabel ('amp')

y1= cos(2*pi*t/T);
subplot(3,3,2)
plot(t,y)
title('cos wave')
xlabel ('time') ,ylabel ('amp')

t1=0:.1:5;
e=exp(t1);
subplot(3,3,3)
plot(t1,e)
title('exponential wave')
xlabel ('time') ,ylabel ('amp')

t2=-20:0.01:20;
s=square(t2);
subplot(3,3,4)
plot(t2,s)
title('square wave')
xlabel ('time') ,ylabel ('amp')

r=t2;
subplot(3,3,5)
plot(t2,r)
title('ramp')
xlabel ('time') ,ylabel ('amp')

s1=sawtooth(t2);
subplot(3,3,6)
plot(t2,s1)
title('sawtooth wave')
xlabel ('time') ,ylabel ('amp')

N=40
x2=ones(1,N)
n=0:1:N-1;
subplot(3,3,7)
plot(n,x2)
title('UNIT STEP SEQUENCE')
xlabel ('time') ,ylabel ('amp')

n33=-4:1:4
x33=[zeros(1,4),1,zeros(1,4)]
subplot(3,3,8)
plot(n33,x33)
title('impulse')
xlabel ('time') ,ylabel ('amp')

EXPERIMENT 1(b)

clc;
clear all
close all
t=-1:.01:1;
T=.2
y= sin(2*pi*t/T);
subplot(3,3,1)
stem(t,y)
title('sin wave')
xlabel ('time') ,ylabel ('amp')

y1= cos(2*pi*t/T);
subplot(3,3,2)
stem(t,y)
title('cos wave')
xlabel ('time') ,ylabel ('amp')

t1=0:.1:5;
e=exp(t1);
subplot(3,3,3)
stem(t1,e)
title('exponential wave')
xlabel ('time') ,ylabel ('amp')

t2=-20:0.01:20;
s=square(t2);
subplot(3,3,4)
stem(t2,s)
title('square wave')
xlabel ('time') ,ylabel ('amp')

r=t2;
subplot(3,3,5)
stem(t2,r)
title('ramp')
xlabel ('time') ,ylabel ('amp')

s1=sawtooth(t2);
subplot(3,3,6)
stem(t2,s1)
title('sawtooth wave')
xlabel ('time') ,ylabel ('amp')
N=40
x2=ones(1,N)
n=0:1:N-1;
subplot(3,3,7)
stem(n,x2)
title('UNIT STEP SEQUENCE')
xlabel ('time') ,ylabel ('amp')

n33=-4:1:4
x33=[zeros(1,4),1,zeros(1,4)]
subplot(3,3,8)
stem(n33,x33)
title('impulse')
xlabel ('time') ,ylabel ('amp')

You might also like