www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcmodel/@modelinput/CreateDesign.m

    function D = CreateDesign(Inputs,varargin)
%CREATEDESIGN create a design object based on inputs
%
% D = CreateDesign(Inputs);
% D = CreateDesign(Inputs,prop1,value1,...);
%   The property value pairs are properties of mbcdoe.design. Design Type
%   can be specified at creation.
%
% Example
% Create a classical full factorial design based on the inputs defined by a mbcmodel.modelinput object:
% 
% design = CreateDesign( inputs, 'Type', 'Full Factorial' );
%
% See also mbcmodel.model.CreateDesign, mbcmodel.testplan.CreateDesign

%  Copyright 2007 The MathWorks, Inc. 

des = designobj(Inputs.Object);
% get default design type.
DefaultType = mbcdoe.design.DefaultType(nfactors(des));
D = mbcdoe.design(des,'Type',DefaultType,varargin{:});