0% found this document useful (0 votes)
33 views9 pages

Lab Report (01) Department of ECE

This lab report summarizes an introductory MATLAB experiment. The student plotted the sine, cosine, tangent, secant, cosecant, and cotangent functions from 0 to 2π to familiarize themselves with MATLAB's interface and basic functions. The same source code and plotting method was used for each trigonometric function by simply changing the function. Through this experiment, the student gained initial insights into MATLAB and learned how to define variables, write simple code, and analyze trigonometric graphs.

Uploaded by

Angelina Nilima
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)
33 views9 pages

Lab Report (01) Department of ECE

This lab report summarizes an introductory MATLAB experiment. The student plotted the sine, cosine, tangent, secant, cosecant, and cotangent functions from 0 to 2π to familiarize themselves with MATLAB's interface and basic functions. The same source code and plotting method was used for each trigonometric function by simply changing the function. Through this experiment, the student gained initial insights into MATLAB and learned how to define variables, write simple code, and analyze trigonometric graphs.

Uploaded by

Angelina Nilima
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/ 9

Lab Report (01)

Department of ECE

Student’s Name : Mahamudul Hasan

Student’s ID : 2018-2-50-029

Course Code : ICE 314


Course Title : Digital Communications

Submitted To : Zahidur Rahman


Section : 01
Submission Date : 08/03/2021
Experiment Number: 01

Experiment Name: Introduction to MATLAB.

Objective:
 Gaining initial insight in MATLAB
 Getting familiar with MATLAB’S user interface
 Learning basic functions of MATLAB
 Plotting trigonometrical graphs using MATLAB

Tools: Laptop, MATLAB

Description: MathWorks created the MATLAB programming language. It began as a matrix programming

language with basic linear algebra programming. It is mainly used for computing and visualization.

MATLAB is an integrated framework with an array as its basic data feature that does not require

dimensioning. This helps us to solve many technical computing problems in a fraction of the time it takes to

write a program in other languages like C or Fortran, particularly those involving matrix and vector

formulations. From simple functions like number, sine, cosine, and complex arithmetic to more complex

functions like matrix inverse, matrix eigenvalues, Bessel functions, and fast Fourier transform, there is a

large array of computational algorithms. Therefore, MATLAB is a very popular tool among students and

university teachers.
Source code and Graphs:

Sin operation:

Sin graph:

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

Here we have taken the value of x from 0 to 2π, which means from 0 to 360°. Then we have to place the
variable x to a sin function. Our task is not finished here. To show the graphical representation we have to
use the plot() function. After that, to make the graph more perceivable I have added label on both x & y
axis.
Cosine operation:

Cosine graph:

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

Here, we can see a cosine wave. The implementation is similar to the previous sin wave. Only, instead of
sin() function a cos() function is used while everything else remains the same.
Tangent operation:

Tangent graph:

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

This figure here shows us the tangent wave between range 0 to 2 π. The tan() function is used to plot the
graph in MATLAB. The source code is the same as all the other functions only except the tan() function.
Secant operation:

Secant graph:

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

This figure here shows us the Secant wave between range 0 to 2 π. The sec() function is used to plot the
graph in MATLAB.
Cosecant operation:

Cosecant graph:

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

The tangent wave between ranges 0 and 2 π is depicted in this diagram. In MATLAB, the graph is plotted
using the csc() function. Except for the csc() module, the source code is the same as the previous functions.
Cotangent operation:

Cotangent graph:

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

This diagram depicts the tangent wave between ranges 0 and 2. The graph is plotted in MATLAB using the
cot() function. The source code is identical to the previous functions except for the cot() module.
Discussion:
 In this lab, we have attained basic familiarities with MATLAB.
 We have seen how to define variables, basic functions and write simple code.
 Here we have plotted some trigonometrical functions and analyzed their graphs.
 From the lab, we can see that plotting different trigonometrical functions are very easy and
the same source code can be used with the proper function to plot any graph.
 We have also learned how to plot multiple graphs in a single window for side-by-side
analysis.

You might also like