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

College of Engineering

Advanced Mathematics for ECE - Lab

Experiment No. 3
Using MATLAB

Pangan, Zacarias Lancelot


Cruz, Sean Chris Kirk Patrick
Dalit, Angeline
Cagubcub, Carl Patrick
Bacar, Joshua
Dela Cruz, Jeif Rhey
Grade
Course: BSECE

Date Performed: January 19, 2023


Date Submitted:

Marcelo O. Santos
Instructor
I. Objective
To be able to use MATLAB as tool to solve problems in Advanced
Mathematics

II. Discussion:
MATLAB is a numerical computing tool that is widely used in the
scientific and engineering communities for solving advanced
mathematics problems. It has a wide range of built-in functions for
linear algebra, optimization, signal and image processing, control
systems, and many other areas of mathematics. It also has a flexible
and powerful programming environment that allows users to create
their own functions and scripts for solving complex problems.
Additionally, MATLAB has extensive toolboxes for specific applications
such as statistics, neural networks, and symbolic mathematics. Overall,
MATLAB is a powerful tool for solving advanced mathematics problems,
and its wide range of built-in functions and toolboxes make it a
popular choice among researchers and engineers.

III. Procedure:

MATLAB is like any programming language that allows you to do


mathematical operations. For example, try: 1+1, sqrt(4), or sin(pi/2).

Also, you can present complex numbers by:

Symbol Function
abs(x) absolute value.

angle angle of complex number x.

conj(x) complex conjugate of x.

imag(x) imaginary part of complex number x.


Symbol Function
real(x) real part of complex number x .

Vector

The vector is a one-dimensional array of numbers.

Row vector

You can create row vectors by:

A=[1 2 3 4] or A=[1,2,3,4]
MATLAB will return the following result:

Slicing operation

To output a specific range of elements, you have to reference the vector with
a colon.

For example:

The result will be:


If you want to list all of the vector elements, you can use values(:).

Column vector

You need to use semicolons between values.

For example:

The output:

Matrix

The matrix is a two-dimensional array of numbers.

To create a matrix, you have to enter the elements in each row with space or
colon between them. Then you have to use semicolons to delimit the rows as we
saw above.
For example:

The results:

Zeros, ones, and eye

When you use zeros which is a built-in function, it initializes a matrix of


specified dimensions with values initialized to 0.

For example, if you write a = zeros(4:5) then the result will be four rows and
five columns of zeros:

The ones method is similar to zeros, except it initializes the matrix’s values to
1.
Eye is a built-in function that generates an identity matrix. An identity matrix
is characterized by all diagonal elements being 1 and the non-diagonal
entries equal to 0.

Example:

The results:

Linspace

Linspace generates vectors with entries spaced equidistantly. It takes in the


starting point, the ending point, and the number of points as its arguments.

For example, if you write linspace(1,10,10) then the result will be:

But if you change the last value to 8 instead of 10 then the result will be:
IV. Observation
From my observation, MATLAB is widely used in different fields,
such as engineering, physics, and finance, due to its powerful
capabilities and wide range of built-in functions and toolboxes. It's also
widely used in research, education and industry, due to its user-friendly
interface, flexibility, and extensive documentation.

Overall, my observation indicates that MATLAB is an extremely


powerful tool for solving advanced mathematics problems. Its wide
range of built-in functions and toolboxes make it a popular choice
among researchers and engineers, and its flexibility and powerful
programming environment make it an ideal tool for solving complex
problems that require advanced mathematical techniques.

One of the main advantages of using MATLAB is the ability to


perform complex calculations with ease. The software has a vast
library of functions that can be used to perform various mathematical
operations, such as linear algebra, optimization, and signal and image
processing. This makes it an ideal tool for solving problems that
require advanced mathematical techniques.

Another advantage of using MATLAB is its flexibility and powerful


programming environment. This allows users to create their own
functions and scripts, which can be used to solve complex problems
that are not easily solvable with the built-in functions. This capability
is particularly useful for researchers and engineers who need to
develop their own mathematical models.
V. Conclusion
In conclusion, MATLAB is a powerful numerical computing
tool that is widely used in the scientific and engineering communities
for solving advanced mathematics problems. The software has a user-
friendly interface and a wide range of built-in functions that make it
an ideal tool for solving various types of mathematical problems.
Additionally, its flexibility and powerful programming environment
allow users to create their own functions and scripts for solving
complex problems. Furthermore, the availability of toolboxes for
specific applications such as statistics, neural networks, and symbolic
mathematics make it a versatile tool for solving specialized problems.
Overall, my observations indicate that MATLAB is a valuable tool for
solving advanced mathematics problems and its popularity among
researchers, engineers and educators is well-deserved.

You might also like