www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregcubic/simSetEvalParam.m

    function simSetEvalParam(m,sys)
%simSetEvalParam Set a mask for Simulink containing the model parameters
% Creates a mask for the system and then adds the model parameters inside
% the mask.
%
% simSetEvalParam(M,B) Create a mask for Simulink block B and adds the
% parameters from model M into the mask.

%  Copyright 2000-2014 The MathWorks, Inc. and Ford Global Technologies, Inc.

vars = {'coeffs','nfactors','reorderM','interact','orderM'};
values{1} = double(m); 
values{2} = nfactors(m); 
values{3} = reorder(m);
values{4} = get(m, 'maxinteract');
values{5} = order(m); 

AddVariablesToUserdata(sys,vars,values);