(E193004) Experiment Report 1 CCE-2408

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Department Of Computer & Communication Engineering

LAB REPORT
Experiment No : 01
Experiment Name : Basic Plotting of MATLAB Software
Course Name : Basic Communication Engineering Sessional
Course Code : CCE-2408
Submitted To : Mohammad Jashim Uddin

Assistant Professor,ETE,IIUC.

Submitted By
Name : Md Fahim
ID No : E193004
Semester : 5th
Section :A
Date Of Experiment: 23-01-2022
Date Of Submission : 15-02-2022
Remark
Experiment No: 1
Experiment Name: Basic Plotting of MATLAB Software
Objective:
1. To study on basic plot with the help of coding using the Mathlab software.

Equipment:
1. PC with MATHLAB software.

Theory:
MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-
paradigm programming language and numeric computing environment developed
by MathWorks. MATLAB allows matrix manipulations, plotting of functions and
data, implementation of algorithms, creation of user interfaces, and interfacing
with programs written in other languages.
Although MATLAB is intended primarily for numeric computing, an optional toolbox
uses the MuPAD symbolic engine allowing access to symbolic computing abilities.
An additional package, Simulink, adds graphical multi-domain simulation
and model-based design for dynamic and embedded systems.

Plot Equation 1:
t=0:.01:3;
y=exp(x*t);
plot(t,y);
Title('Plotting of exponential wave');
xlabel('Time')
ylabel('Amplitude')
Curve Waveform:
Plot Equation 2:
t:-1:.01:3;
Y=exp(-t);
plot(t,Y);

Curve waveform:
Plot Equation 3:
a=2;
f=5;
w=2*pi*f;
t=0:.1:5;
y=a*cos(w*t);
plot(t,y,'b');
title('Plotting of tan wave')
xlabel('Time')
ylabel('Amplitude')
Output Wave Form:

Plot Equation 4:
a=2;
f=5;
w=2*pi*f;
t1=1:.1:5;
t2=0:.1:5;
y1=a*sin(w*t1+45);
y2=10*cos(w*t2+90);
plot(t1,y1,'r-o',t2,y2,'b');
title('Plotting of sin vs cos wave')
xlabel('Time')
ylabel('Amplitude')
legend('sine curbve','cos curve')

Output Waveform:

Sub Plotting Equation 5( Row 2 Colum1):


a=3;
f=3;
w=2*pi*f;
t=0:.01:5;
y1=a*cos(w*t);
y2=a*sin(w*t);
subplot(2,1,1)
plot(t,y1,'blue')
grid on
title('Plotting cos wave')
xlabel('Time')
ylabel('Amplitude')
subplot(2,1,2)
plot(t,y2,'red')
title('Plotting sin wave')
xlabel('Time')
ylabel('Amplitude')
Curve Webform:
Sub Plotting Equation 6(Row 1 Colum 3):
a=2;
f=2;
w=2*pi*f;
t=0:.01:3;
y1=a*sin(w*t);
y2=a*cos(w*t);
y3=a*tan(w*t);
subplot(1,3,1)
plot(t,y1,'blue')
title('Plotting sin wave')
xlabel('Time')
ylabel('Amplitude')
subplot(1,3,2)
plot(t,y2,'red')
title('Plotting cos wave')
xlabel('Time')
ylabel('Amplitude')
subplot(1,3,3)
plot(t,y3,'black');
title('Plotting tan wave')
xlabel('Time')
ylabel('Amplitude');

Curve webform:
Sub Plotting Equation 7(Row 2 Colum 6):
a=2;
f=2;
w=2*pi*f;
t=0:.01:3;
y1=a*sin(w*t);
y2=a*cos(w*t);
y3=a*tan(w*t);
y4=a*csc(w*t);
y5=a*sec(w*t);
y6=a*cot(w*t);
subplot(2,3,1)
plot(t,y1,'blue')
title('Plotting sin wave')
xlabel('Time')
ylabel('Amplitude')
subplot(2,3,2)
plot(t,y2,'red')
title('Plotting cos wave')
xlabel('Time')
ylabel('Amplitude')
subplot(2,3,3)
plot(t,y3,'black');
title('Plotting tan wave')
xlabel('Time')
ylabel('Amplitude');
subplot(2,3,4)
plot(t,y4,'blue')
title('Plotting cosec wave')
xlabel('Time')
ylabel('Amplitude')
subplot(2,3,5)
plot(t,y5,'green')
title('Plotting sec wave')
xlabel('Time')
ylabel('Amplitude')
subplot(2,3,6)
plot(t,y6,'red')
title('Plotting cot wave')
xlabel('Time')
ylabel('Amplitude')

Curve Webform:
Discussion:
From this lab we learn about matlab . How to install and run program. In this lab
we have learn how to code for an equation and learn about the curve wave form
of those equation. We have faced some problem like how to solve exponential
equation, sub plotting for many equation.To solve those problem our instructor
help us. And we learn plotting and sub plotting and we draw some basic plot like
exponential wave form, sin, cos, tan etc .We perfectly draw this wave form show
in fig above.

You might also like