EXPERIMENT-1
AIM : Plot elementary waveforms in continuous time domain
1.Impulse waveform
2.Unitstep waveform
3.Ramp waveform
4.Parabola waveform
5.trianular waveform
6.square waveform
7.sine waveform
8.sinc waveform
Apparatus required : An laptop or monitor ,matlab softaware (R2016a)
Keywords used: plot,title,xlabel,ylabel,tripulse,square, and some arithmetic operation
Theory:
1.matlab code for impulse waveform :
t=-20:0.01:20;
y=1==(t==0);
plot(t,y,'R--')
title('impulse function')
xlabel('x-axis')
ylabel('y-axis')
2.matlab code for unitstep waveform:
t=-20:0.01:20;
y=1==(t>0);
plot(t,y);
title('unit step function')
xlabel('x-axis');
ylabel('y-axis');
3.matlab code for ramp waveform :
t=0:0.01:500;
y=t;
plot(t,y)
title('ramp function')
xlabel('x-axis')
ylabel('y-axis')
4.matlab code for parabola waveform :
x=-6*pi:0.01:6*pi;
y=(x.^2);
plot(x,y)
title('perabola ')
xlabel('x-axis')
ylabel('y-axis')
5. matlab code for triangular waveform :
x=-4*pi:0.01:4*pi;
y=tripuls(x,10,0);
plot(x,y);
title('tripulse waveform');
xlabel('x-axis');
ylabel('y-axis');
6.matlab code for square waveform :
t=-4*pi:0.01:4*pi;
y=square(t);
plot(t,y)
title('square wave');
xlabel('x-axis')
ylabel('y-axis')
7.matlab code for sine waveform :
x=-6*pi:0.4:6*pi;
y=sin(x);
plot(x,y)
title('sin wave');
xlabel('x-axis');
ylabel('y-label');
8.matlab code for sinc waveform :
x=-8*pi:0.001:8*pi;
y=sin(x)./x;
plot(x,y);
title('sinc function');
xlabel('x-axis');
ylabel('y-axis');
OUTPUTS :
1.Output of impulse waveform :
2.output of unitstep waveform
3.output of ramp waveform :
4.output of parabola waveform :
5. output of triangular waveform :
6.output of square waveform :
7.output of sine waveform :
8.output of sinc waveform :