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

Exercises of Applied Mathematics

Ana I. Pereira
September 2019

Matlab Exercises
Exercises to remember the Matlab or similar software.

1. Consider the matrix M (5 x 6). Indicates:


(a) The largest element in each row of the matrix.
(b) The smallest element of each column of the matrix and its position.
(c) The average of the matrix elements.
(d) The standard deviation of matrix elements.
(e) Calculate the matrix determinant.
(f) Remove the upper submatrix of dimension 2 by 2.

2. Consider two vectors. Calculate


(a) The inner product.
(b) The vectorial product.
(c) The product of each element, respectively.

3. Consider the excel table

a b c d e
1 2 3 4 5
6 7 8 9 10

(a) Print the element of position (2,3).


(b) Write in a file the element of position (2,3).
(c) Increase the table with the sum of the elements.

1
4. Consider the function f (x, y) = x2 ey + yx.
(a) Plot the function.
(b) Identify a given point.
(c) Contour plot.
(d) What can you do more?

5. Use the function fsolve to solve 2 cos2 (x) + 3 sin(x) − 3 = 0. Explore the
options.

6. Plot f (x) = (x − 2)2 + 2. Consider x0 = −2. Plot the sequence xi =


x0 + 0.5i, for i = 0, 1, ....8 in a motion way.

You might also like