function thn=sett(th,T);
%SETT   Sets the sampling interval in TH-structures and frequency functions.
%   OBSOLETE function. Use Property 'Ts' instead.
%
%   THN = sett(TH,T)  or GN = sett(G,T)
%
%   TH:  The original model in THETA-format
%   T:   The sampling interval
%   THN: The new model in THETA-format, with sampling interval T
%   or
%   G:   The original frequency function
%   GN:  The frequency function with frequencies scaled according to
%        the desired sampling interval
%   For frequency functions SETT works only for functions generated by
%   (see also) SPA, ETFE, TH2FF, or TRF, with a default choice of
%   frequencies. See also FREQFUNC.

%   L. Ljung 10-2-90
%   Revised 21-4-91
%   Copyright 1986-2000 The MathWorks, Inc.
%   $Revision: 1.6 $ $Date: 2000/08/24 12:53:36 $

if nargin<2
   disp('Usage: THN = SETT(TH,T)')
   return
end
thn = th;
set(thn,'Ts',T);

% Consider adding a method for this
if isa(thn,'idfrd')
  set(thn,'Frequency', thn.Frequency/T);
end
