%% Getting Started with LTI Models -- Discrete-Time LTI Models


%   Copyright 1986-2004 The MathWorks, Inc.
%   $Revision: 1.1.6.1 $  $Date: 2004/08/17 21:33:08 $


%% Discrete-Time LTI Models
%
% The Control System Toolbox supports the use of both continuous-time and
% discrete-time models.
%
% The syntax for the creation of a discrete-time model is similar to that
% for a continuous-time model, except that you must also provide a sampling
% time.

%% Example: Creating Discrete-Time LTI Model Transfer Functions
% $$ H(z) = \frac{z - 1}{z^2 - 1.85 z + 0.9} $$
%
% Sample Time = 0.1 sec
%
% You can specify a discrete-time transfer function model by providing a
% sample time argument to the TF command:

num = [ 1  -1 ];
den = [ 1  -1.85  0.9 ];
H = tf(num,den,0.1);      % Ts = 0.1 sec

%%
% You can also specify this model as a rational expression of z:
 
z = tf('z',0.1);          % Ts = 0.1 sec
H = (z - 1) / (z^2 - 1.85*z + 0.9);


