%% Specify Model Discretization Method
% Consider the following discrete-time transfer function.
% H(z) = {{z + 1} \over {{z^2} + z + 1}}
% Create the discrete-time transfer function with a sample time of 0.1 seconds.

Hd = tf([1 1],[1 1 1],0.1);

%
% Specify the discretization method as bilinear (Tustin) approximation and the prewarp frequency as 20 rad/seconds.

opts = d2cOptions('Method','tustin','PrewarpFrequency',20);

%
% Convert the discrete-time model to continuous-time using the specified discretization method.

Hc = d2c(Hd,opts);

% You can use the discretization option set opts to discretize additional models using the same options.
% Copyright 2012 The MathWorks, Inc.