Sample Matlab Code

The step command in Matlab will plot the step response of a given system. One nice thing is that it can do this when you specify the transfer function, as opposed to the time domain differential equation.

The following simulates the step response of a rather complicated transfer fuction.

% This code simulates a step input to the system described by the 
% transfer function 
% G(s) = (s^3 + 5 s^2 + 2 s + 3)/(s^5 + 5 s^4 + 33 s^3 + 72 s^2 + 102 s + 64)
%
% B. Goodwine, February 4, 1998


num = [1 5 2 3];
den = [1 5 33 72 102 64];

step(num,den);


Return to ME 437 Homepage.

Last updated: February 4, 1998.
B. Goodwine (jgoodwine@nd.edu)