MATH319 Slides

167 Appendix A: MATLAB commands concluded

≫Q=lyap(A,P) [given positive definite P and square A, solves A⁢Q+Q⁢A′=-P]

≫ X=lyap(A,B,C) [solves A⁢X+X⁢B=-C]

≫ t=-100:0.1:100 [introduces the vector [-100, -100+0.1,… ,100]]

≫ plot(y) [plots the imaginary part of y versus the real part of y]

≫ angle (z) [computes the argument of the complex number z]

≫ laplace((t2)*exp(2*t)) [computes the Laplace transform of t2⁢e2⁢t, and gives values in a variable s]

≫ nyquist(T) [plots the Nyquist locus of a given real rational function]

≫ bode(T) [created the Bode pole of a real rational function] Beware: nyquist and bode have difficulties with complex coefficients.

≫ [g,c,d]=gcd(a,b) [computes the greatest common divisor of a and b and expresses the gcd as a⁢c+b⁢d]