Académique Documents
Professionnel Documents
Culture Documents
Objective
Introduction
Exercises
1 2 4
A = 7 8 9
21 6 4
2 2 4
B = 7 3 5
21 6 7
Compute the following operations indicating the used commands:
Sum of two first columns of A
1
Exercise 5. Visualizing and erasing variables. Write the Matlab commands that: (a) show the variables of the workspace, (b) test the dimension and
type of variable, (c) erase a variable, (d) erase all the variables, (e) close all the
figures.
Exercise 6. Computing matrices. Compute: (a) a matrix of zeros with
3 rows and 4 columns, (b) an identity matrix with 4 rows and 3 columns, (c) an
identity matrix 3x3. NOTE: Use the commands: zeros, ones, eye.
Exercise 7. Graphics. Plot the curves y = x.sin(x), y = x, respect the axis x
in the interval [0, 1]. Show the graphics with different color or line style, add axis labels and add a legend to the graphs (using title, xlabel, ylabel, legend and grid).
Exercise 8. Define a vector x that ranges from 0 to 100 by steps of size 0.5. Plot
sin(x) and 1 + cos(x) on the same graph. Represent the sine curve with a dashed
line and the cosine curve by a dashdot. Also label the graph and save it as a script.
Exercise 9. Polynomials. Answer the questions: (a) Represent the polynomial s5 + 3s3 + 7s2 + 3s + 4 and find its roots (use the command roots). (b)
Considering the roots of the polynomial , -3, -8, -5, represent this polynomial (use
the command poly).
Exercise 10. Creating models. Considering the following transfer function:
G(s) =
s2
(s + 2)
+ 4s + 3
s3 s+2
s5 +2s4 +3s3 6s2 +2s+1
G2(s) =
3
s2 +7s+6
G3(s) =
7(s+1)(s2)
e4.7s
(s+5)(s+4)(s+3)
G4(s) =
4
(s2)(s+3)
G5(s) =
s2 2s+2
(s+2)(s+3)(s+4)
If the transfer function is in polynomial form then convert this expression to zeros
and poles and vice-versa.
Exercise 12. Manipulating blocks (I). Obtain the equivalent transfer func0.1
1
, G2(s) = 1s , G3(s) = s+2
and
tion of the following block scheme with G1(s) = s+4
H(s) = 10. Use the commands series, parallel, feedback.
Work to be done
1. Get familiar with matlab by performing all the tasks at the laboratory, asking
the teacher.
2. The work must be done individually, since it is necessary that students master
the subject. Some of the final exam will address topics covered in the labs.
4
3. Write a precise report using the Publish tool, embedded into MATLAB IDE.
For further information ask google for publishing matlab code or getting pdf
from matlab code.
Deadline
Upload to the virtual platform both the matlab-script and the pdf-file generated.
Deadline: November 6th 2015, 23:55h.