Professional Documents
Culture Documents
Experiment 3
Experiment 3
Experiment No. 3
Using MATLAB
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:
Symbol Function
abs(x) absolute value.
Vector
Row vector
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:
Column vector
For example:
The output:
Matrix
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:
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
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.