%% Getting Started with LTI Models -- Model Type Conversions

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

%% Model Type Conversions

GSModelTypeConversions_aux(1) % Draw Diagram

%%
% The Control System Toolbox allows you to convert LTI models from one type
% to another, as shown below.
%
% >> sys = tf(sys)               % Conversion to TF
%
% >> sys = zpk(sys)              % Conversion to ZPK
%
% >> sys = ss(sys)               % Conversion to SS
%
% >> sys = frd(sys,frequency)    % Conversion to FRD
%
% Note that you cannot convert *FRD* models to the other model types
% and that conversion to *FRD* requires a frequency vector as input.
 

%% Example: Model Conversion

GSModelTypeConversions_aux(2) % Draw Diagram

%%
% For example, you can convert the state-space model
%
sys = ss(-2,1,1,3);

%% 
% to a zero-pole-gain model using

sys = zpk(sys);


%% Example: Implicit Model Conversion
GSModelTypeConversions_aux(3) % Draw Diagram

%%
% Some algorithms operate on only one type of LTI model.  For convenience,
% such commands automatically convert LTI models to the appropriate or
% required model type.  For example, in

sys = ss(0,1,1,0);
[num,den] = tfdata(sys);

%%
% the function TFDATA internally converts the state-space model sys to an
% equivalent transfer function model in order to obtain its numerator and
% denominator data.

