Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

EAST WEST UNIVERSITY

LAB REPORT- 01
Course Code: ICE 314
Section: 01

Experiment Name: Introduction to MATLAB.

Submitted to:
Zahidur Rahman (ZRN)
Lecturer
Department of Electronics and Communications Engineering

Submitted by:
Nadia Akter Nitu
ID: 2019-1-57-
048

Date of Submission: 31-12-2021


Experiment Number: 01
Experiment Name: Introduction to MATLAB.
Objective:
 Getting to know the MATLAB user interface.
 Learning the basics of MATLAB.
 Using MATLAB code to plot different trigonometric operations e.g. sine,
cosine, tangent, cotangent, secant and cosecant.
Tools: MATLAB
Description:
MATLAB is an integrated platform for technical computing, computation, and
visualization. The acronym MATLAB stands for Matrix Laboratory. It's ideal for
manipulating matrices and solving problems in Linear Algebra, Modelling,
Simulation, and Control applications.
Source Code and Graphs:
Sine Function:

1
Sine Function Graph:

Figure 1: Graphical representation of a Sine function (0 to 2π)

We begin by writing three commands that clean all of the memory space used by
previously mentioned variables, clear the command window, and clear all figures
and other windows that opened instead of the current window. Following that, we
created a variable called x. With a range of 0 to 2, this variable was used to set the
size of the step interval. To demonstrate the sine function, we created a new
variable, y, and used the sin() method. The polt() function was then used to plot the
sine function. To make the graph more accessible, I added labels to both the x and y
axes.
Cosine Function:

2
Cosine Function Graph:

Figure 2: Graphical representation of a Cosine function (0 to 2π)

In this graph, we can see a cosine function graph in the range of 0 to 2 using the
same implementation technique as the sin() function. Instead of using the sin()
function, we utilized the cos() function.
Tangent Function:

3
Tangent Function Graph:

Figure 3: Graphical representation of a Tangent function (0 to 2π)

The tangent function graph is given in the range of 0 to 2, with the same
implementation technique as before. We will use the tan() function instead of the
cos() approach.
Cotangent Function:

4
Cotangent Function Graph:

Figure 4: Graphical representation of a Cotangent function (0 to 2π)

That's the cotangent function graph in the 0 to 2 range, implemented in the same
way as before. We will use the cot() function instead of the tan() method.
Secant Function:

5
Secant Function Graph:

Figure 5: Graphical representation of a Secant function (0 to 2π)

That's the Secant function graph in the 0 to 2 range, implemented in the same way
as before. We will use the sec() function instead of the cot() method.
Cosecant Function:

6
Cosecant Function Graph:

Figure 6: Graphical representation of a Cosecant function (0 to 2π)

The graph of the cosecant function in the range of 0 to 2 is displayed, with the same
implementation technique as before. For cosecant functions, the csc() function is
used instead of the sec() technique.

Discussion:
1. We will learn the fundamentals of MATLAB in this lab.
2. We practice defining variables, performing basic functions, and writing code.
3. We plotted and evaluated the graphs of a variety of trigonometrical functions in
this lab. We can see how simple it is to display a variety of trigonometrical
functions, and how the same source code can be used to create any graph with
the appropriate function.

You might also like