Control Systems Lab: Introduction To MATLAB
Control Systems Lab: Introduction To MATLAB
Introduction to MATLAB
Surrayya Mobeen
1. Introduction
3. Task
MATLAB
MATLAB
MATLAB
Lab Task
1. Introduction
3. Task
ÿ + (1 + a)ẏ + ay = u, a = −0.01, 0, 0.01
1. Introduction
3. Task
What is MATLAB?
u = 0 1 2 3 4 5 6 7 8 9 10
u = 0 1 2 3 4 5 6 7 8 9 10
In this method the user species the 1st and the last number of the array and
the interval between two consecutive numbers of the array
To compute the size of any matrix the command size is used. For example,
we want to nd the size of B matrix.
Similarly, if you want to extract the 2nd element (column) in the 3st row of
matrix A.
Suppose that we want to solve the system Ax = B . This can be written as:
x = A−1 B
0 0
5 0.5
10 1
15 1.5
17 1.6
18 1.55
19 1.5
0 0
4 0.5
8 1.1
12 1.55
16 1.6
17 1.55
18 1.5
If for instance, you have already plotted 1 curve on a gure and without
writing a new code you want to add a new curve to the same plot, then the
`hold on' command is used. The code for this case would be:
If you have plotted one graph and want to plot another graph in a separate
window, then by default if you just use the plot command, MATLAB would
overwrite the existing graph but this not what you want. So for this,gure()
is used.
If you have plotted one graph and want to plot another graph in a separate
window, then by default if you just use the plot command, MATLAB would
overwrite the existing graph but this not what you want. So for this,gure()
is used.
If the variables are linked through an equation and you are to plot a graph
between the two variables, then one variable is dened as an array and the
second variable is given as a function of the rst variable.
If the variables are linked through an equation and you are to plot a graph
between the two variables, then one variable is dened as an array and the
second variable is given as a function of the rst variable.
If the variables are linked through an equation and you are to plot a graph
between the two variables, then one variable is dened as an array and the
second variable is given as a function of the rst variable.
If the variables are linked through an equation and you are to plot a graph
between the two variables, then one variable is dened as an array and the
second variable is given as a function of the rst variable.
If the variables are linked through an equation and you are to plot a graph
between the two variables, then one variable is dened as an array and the
second variable is given as a function of the rst variable.
6.5h(m)
T = 15 −
1000
1. Introduction
3. Task
Task
1.2 3.04 7.3 3.2
1.3 1.6
−1 −12 1.2 5
−1
4.5
A= 2.7 1 −2 4 B=
2.5
5.9
6.6 4.51 0 1
4.8 −6.3
−3 −2.2 1 6
1.2 3.04 7.3 3.2
1.3 1.6
−1 −12 1.2 5
−1
4.5
A= 2.7 1 −2 4 B=
2.5
5.9
6.6 4.51 0 1
4.8 −6.3
−3 −2.2 1 6
1.2 3.04 7.3 3.2
1.3 1.6
−1 −12 1.2 5
−1
4.5
A= 2.7 1 −2 4 B=
2.5
5.9
6.6 4.51 0 1
4.8 −6.3
−3 −2.2 1 6
1.2 3.04 7.3 3.2
1.3 1.6
−1 −12 1.2 5
−1
4.5
A= 2.7 1 −2 4 B=
2.5
5.9
6.6 4.51 0 1
4.8 −6.3
−3 −2.2 1 6
1.2 3.04 7.3 3.2
1.3 1.6
−1 −12 1.2 5
−1
4.5
A= 2.7 1 −2 4 B=
2.5
5.9
6.6 4.51 0 1
4.8 −6.3
−3 −2.2 1 6
z = e−2t cos(3t + 1) − π ≤ t ≤ 5π
The deection of a cantilever beam is the distance its end moves in response to a
force applied at the end. The following table gives the deection x that was
produced in a particular beam by the given applied force f. Plot the graph:
Force f (pound) 0 100 200 300 400 500 600 700 800
Deection x (inches) 0 0.09 0.18 0.28 0.37 0.46 0.55 0.65 0.74