Professional Documents
Culture Documents
Lab 1
Lab 1
Title
To study the basics of MATLAB
Apparatus
MATLAB Software
Introduction
This lab aims to cover/revise basics of Matlab as well as basics of Modelling that you
have already studied in previous semesters.
1b: Arrays/Matrices:
A=[1 2 3];
Operations on Matrices
3: Solving Polynomials:
s2 s 1 0
B=[1 1 1];
A=roots(B)
poly(A)
roots command computes the roots of polynomial whose coefficients are elements of
vector provided.
SYS=tf(NUM,DEN)
step(SYS)
impulse(SYS)
lsim(SYS)
6: State Space:
tf2ss(sys)
ss2tf()
7: Series/Parallel:
We can use the “series” function to cascade two transfer functions G1(s) and G2(s),
>> numg=[1];
>> deng=[500 0 0];
>> sysg=tf(numg,deng);
>> numh=[1 1];
>> denh=[1 2];
>> sysh=tf(numh,denh);
>> sys=series(sysg,sysh)
>> sys=paralell(sysg,sysh)
Task
In next lab