Mat Lab Practical
Mat Lab Practical
Mat Lab Practical
1.Impulse waveform
2.Unitstep waveform
3.Ramp waveform
4.Parabola waveform
5.trianular waveform
6.square waveform
7.sine waveform
8.sinc waveform
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')
t=-20:0.01:20;
y=1==(t>0);
plot(t,y);
xlabel('x-axis');
ylabel('y-axis');
t=0:0.01:500;
y=t;
plot(t,y)
title('ramp function')
xlabel('x-axis')
ylabel('y-axis')
x=-6*pi:0.01:6*pi;
y=(x.^2);
plot(x,y)
title('perabola ')
xlabel('x-axis')
ylabel('y-axis')
x=-4*pi:0.01:4*pi;
y=tripuls(x,10,0);
plot(x,y);
title('tripulse waveform');
xlabel('x-axis');
ylabel('y-axis');
t=-4*pi:0.01:4*pi;
y=square(t);
plot(t,y)
title('square wave');
xlabel('x-axis')
ylabel('y-axis')
x=-6*pi:0.4:6*pi;
y=sin(x);
plot(x,y)
title('sin wave');
xlabel('x-axis');
ylabel('y-label');
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 :