%% Third-Order Padé Approximation
% Compute a third-order Padé approximation of a 0.1-second I/O delay.

s = tf('s');
sys = exp(-0.1*s);    
sysx = pade(sys,3)

% Here, sys is a dynamic system representation of the exact time delay of 0.l s.  sysx is a transfer function that approximates that delay.
%
% Compare the time and frequency responses of the true delay and its approximation. Calling the pade command without output arguments generates the comparison plots. In this case the first argument to pade is just the magnitude of the exact time delay, rather than a dynamic system representing the time delay.

pade(0.1,3)

% Copyright 2015 The MathWorks, Inc.