Control Systems Lab 1 Linear Control System: Submitted To: Dr. Haris Awan Date: Submitted by
Control Systems Lab 1 Linear Control System: Submitted To: Dr. Haris Awan Date: Submitted by
Control Systems Lab 1 Linear Control System: Submitted To: Dr. Haris Awan Date: Submitted by
LAB 1
Linear Control System
➢ create row vector x starting with start, ending at end, having number elements
➢ transpose of vector x
Exercise 1:
Use MATLAB command to obtain the following
a) Extract the fourth row of the matrix generated by magic (6)
b) Show the results of ‘x’ multiply by ‘y’ and ‘y’ divides by ‘x’.
Given x = [0:0.1:1.1] and y = [10:21]
c) Generate random matrix ‘r’ of size 4 by 5 with number varying between -8 and 9
Exercise 2:
Use MATLAB commands to get exactly as the figure shown below
x=pi/2:pi/10:2*pi;
y=sin(x);
z=cos(x);
Part II: Polynomials in MATLAB
Objective: The objective of this session is to learn how to represent polynomials in
MATLAB, find roots of polynomials, create polynomials when roots are known and obtain
partial fractions.
Convolution: De-convocation:
Exercise 1:
Consider the two polynomials ( ) and ( ) . Using
MATLAB compute
a. p(s )*q (s )
b. Roots of p(s ) and q(s )
c. p(-1 ) and q(6 )