KEMBAR78
Mat Lab Practical | PDF | Teaching Methods & Materials | Science & Mathematics
0% found this document useful (0 votes)
59 views7 pages

Mat Lab Practical

The document describes an experiment to plot various elementary waveforms using MATLAB. It provides the MATLAB code to generate and plot impulse, unit step, ramp, parabola, triangular, square, sine, and sinc waveforms. The code demonstrates the use of MATLAB functions like plot, title, xlabel, ylabel, tripulse, and square to generate and label the different waveform plots.

Uploaded by

ratan lal mourya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views7 pages

Mat Lab Practical

The document describes an experiment to plot various elementary waveforms using MATLAB. It provides the MATLAB code to generate and plot impulse, unit step, ramp, parabola, triangular, square, sine, and sinc waveforms. The code demonstrates the use of MATLAB functions like plot, title, xlabel, ylabel, tripulse, and square to generate and label the different waveform plots.

Uploaded by

ratan lal mourya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

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 :

You might also like