www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcfoundation/@propertyinterface/copyprop.m
function [m2,Changed] = copyprop(p,m1,m2) %COPYPROP copy property from m1 to m2 % % [m2,Changed] = copyprop(p,m1,m2) % Copyright 2006 The MathWorks, Inc. Changed = false; fSet = p.SetFunction; if ~isempty(fSet) fGet = p.GetFunction; NewValue = fGet(m1); if ~isequal(NewValue,fGet(m2)) % copy properties to new model if value has changed Changed = true; m2 = fSet(m2,NewValue); end end