BACHELOR OF SCIENCE IN
ELECTRICAL AND ELECTRONIC ENGINEERING
REPORT/ LAB REPORT/ ASSIGNMENT
Report/ Assignment Title: Mathematical Functions using MATLAB.
Course Code & Name: EEE-3202_Digital Communication Lab
Submitted By
Student’s Name: Ala Uddin
ID: 008-37-17
Semester: Spring-2024
Submission Date:
Submitted To
Teacher’s Name: Rubel Kanti Das
Designation: Lecturer
Department: EEE
Southern University of Bangladesh
REMARKS
______________________
Signature
Experiment No: 02
Experiment Name: Mathematical Functions using MATLAB.
Introduction:
MATLAB has a number of built-in functions, such as square root, sine, cosine, exponential etc.
functions. The following table gives a list of some commonly used functions. Later you will also
write your own functions.
Equipment:
➢ Laptop or Desktop
➢ MATLAB Application
Mathematical Functions:
MATLAB offers many predefined mathematical functions for technical computing which contains
a large set of mathematical functions.
Typing help elfun and help specfun calls up full lists of elementary and special functions
respectively. There is a long list of mathematical functions that are built into MATLAB.
These functions are called built-ins. Many standard mathematical functions, such as sin(x), cos(x),
tan(x), e x, ln(x), are evaluated by the functions sin, cos, tan, exp, and log respectively in
MATLAB.
Examples:
We illustrate here some typical examples which related to the elementary functions previously
defined.
As a first example, the value of the expression y = e−a sin(x) + 10√y, for a = 5, x = 2, and y = 8 is
computed by
>> a = 5; x = 2; y = 8;
>> y = exp(-a)*sin(x)+10*sqrt(y) y =
28.2904
The subsequent examples are
>> log(142)
ans = 4.9558
>> log10(142)
ans = 2.1523
Note the difference between the natural logarithm log(x) and the decimal logarithm (base 10)
log10(x).
To calculate sin(π/4) and e10, we enter the following commands in MATLAB,
>> sin(pi/4) ans = 0.7071
>> exp(10) ans = 2.2026e+004
Notes:
➢ Only use built-in functions on the right-hand side of an expression. Reassigning the
value to a built-in function can create problems.
➢ There are some exceptions. For example, i and j are pre-assigned to √−1. However, one
or both of i or j are often used as loop indices.
To avoid any possible confusion, it is suggested to use instead ii or jj as loop indices.
Conclusion:
In this paper, we discuss ways of in which computer technology can be used to learn basic
mathematics. MATLAB is helpful software for numerical computation. MATLAB contains
several symbolic mathematical functions for illustrating mathematical solutions and provide
students visual examples. In particular, six topics in basic mathematics are illustrated using
MATLAB: order of operations, factoring, operations with polynomials, quadratic equations,
functions and system of linear equations.