MATLAB and Simulink Files

by

 

MATLAB and Simulink files for textbook Nise/Controls 6e.

ch7ti5.m
% Nise, N.S. 
% Control Systems Engineering, 5th ed. 
% John Wiley & Sons, Hoboken, NJ, 07030
%
% Control Systems Engineering Toolbox Version 5.0 
% Copyright  2008 by John Wiley & Sons, Inc.

% TryIt 7.5
% Use MATLAB, the Symbolic Math Toolbox, and the
% following statements to find the steady-state 
% error for a step input to the system of 
% Example 7.13.

'TryIt 7.5'
syms s
A=[-5 1 0
    0 -2 1
    20 -10 1];
B=[0;0;1];
C=[-1 1 0];
I=[1 0 0
    0 1 0
    0 0 1];
E=(1/s)*[1-C*...
    [(s*I-A)^-1]*B];
%New command:
%subs(X,old,new):
%Replace old in ...
%X(old)with new.
error=subs(s*E,s,0)

Contact us