www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcmodel/@modelproperties/pInitialise.m
function p = pInitialise(p,m,MBCMODEL) %PINITIALISE - private method % % p = pInitialise(p,m,MBCMODEL) % Copyright 2006-2015 The MathWorks, Inc. p.Object = m; if nargin>2 % connection to mbcmodel.model to enable backwward compatibility for % using objects by reference p.Model = MBCMODEL; end % add model properties to modelproperties object if isa(m,'localmod') && ~isa(m,'localmulti') Type = ['Local ',getType(m)]; else Type = getType(m); end p.Type = Type; p = modelproperties(m,p); p.Type = Type; % convert any xregmodels to mbcmodel.model p.Converter= {'xregmodel',@mbcmodel.CreateModel};