function sys = inherit(sys,pre)
%INHERIT  Lets a new IDMODEL object inherit the properties of another one.
%
%   SYS = INHERIT(SYS,OLDSYS)

%   Copyright 1986-2000 The MathWorks, Inc.
%   $Revision: 1.9 $  $Date: 2000/06/15 11:40:02 $


%% Inherit everything but parameter vector and covariancematrix
idm = pvget(pre,'idmodel');
par = pvget(sys,'ParameterVector');
cov = pvget(sys,'CovarianceMatrix');
noisev = pvget(sys,'NoiseVariance');
%noi = pvget(sys,'NoiseVariance');
idm = pvset(idm,'ParameterVector',par,'CovarianceMatrix',cov,...
   'NoiseVariance',noisev);
sys = pvset(sys,'idmodel',idm);
