Mathworks MODEL-BASED CALIBRATION TOOLBOX 4 CAGE Reference

Model-Based Calib
Reference
ration Toolbox™ 4
How to Contact The MathWorks
www.mathworks. comp.soft-sys.matlab Newsgroup www.mathworks.com/contact_TS.html Technical Support
suggest@mathworks.com Product enhancement suggestions bugs@mathwo doc@mathworks.com Documentation error reports service@mathworks.com Order status, license renewals, passcodes info@mathwo
com
rks.com
rks.com
Web
Bug reports
Sales, prici
ng, and general information
508-647-7000 (Phone)
508-647-7001 (Fax)
The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098
For contact information about worldwide offices, see the MathWorks Web site.
Model-Based Calibration Toolbox™ Reference
© COPYRIGHT 2005–20 10 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written consent from The MathW orks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through the federal government of the United States. By accepting delivery of the Program or Documentation, the government hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and govern theuse,modification,reproduction,release,performance,display,anddisclosureoftheProgramand Documentation by the federal government (or other entity acquiring for or through the federal government) and shall supersede any conflicting contractual terms or conditions. If this License fails to meet the government’s needs or is inconsistent in any respect with federal procurement law, the government agrees to return the Program and Docu mentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand
names may be trademarks or registered trademarks of their respective holders.
Patents
The MathWorks products are protected by one or more U.S. patents. Please see
www.mathworks.com/patents for more information.
Revision History
November 2005 Online only New for Version 3.0 (Release 14SP3+) September 2006 Online only Version 3.1 (Release 2006b) March 2007 Online only Version 3.2 (Release 2007a) September 2007 Online only Revised for Version 3.3 (Release 2007b) March 2008 Online only Revised for Version 3.4 (Release 2008a) October 2008 Online only Revised for Version 3.4.1 (Release 2008a+) October 2008 Online only Revised for Version 3.5 (Release 2008b) March 2009 Online only Revised for Version 3.6 (Release 2009a) September 2009 Online only Revised for Version 3.7 (Release 2009b) March 2010 Online only Revised for Version 4.0 (Release 2010a)
Function Reference
1
Object Creation ................................... 1-2
Contents
Data Manipulation
Data Propertie s Data Methods
Projects
Project Properties Project Methods
Test Plans
Testplan Properties Testplan Methods
Designs
Design Properties Design Methods Generator Properties Generator Methods Candidate Set Properties Candidate Set Methods Design Constraint Properties Design Constraint Methods
Models
Hierarchical Models Local Models Response Mode ls Model Objects Model Parameters Model Properties
........................................... 1-5
......................................... 1-6
........................................... 1-8
............................................ 1-12
................................. 1-3
................................... 1-3
.................................... 1-4
................................. 1-5
................................... 1-5
................................ 1-6
................................. 1-6
................................. 1-8
................................... 1-9
................................ 1-10
............................... 1-12
..................................... 1-13
.................................. 1-15
.................................... 1-17
................................. 1-19
.................................. 1-20
.............................. 1-9
........................... 1-10
............................. 1-10
........................ 1-10
......................... 1-11
Boundary Models
.................................. 1-21
v
2
Boundary Classes ................................. 1-21
AbstractBoundary Properties AbstractBoundary Methods Model Properties Model Methods Boolean Pro pe rties Boolean Methods PointByPoint Properties PointByPoint Methods TwoStage Properties TwoStage Methods Tree Propertie s Tree Methods TwoStageTree Properties
.................................. 1-23
................................... 1-23
................................ 1-23
.................................. 1-24
............................... 1-25
................................ 1-26
................................... 1-26
..................................... 1-26
........................ 1-22
......................... 1-22
............................ 1-24
............................. 1-25
........................... 1-27
Commands — Alphabetical List
vi Contents

Function Reference

1
Object Creation (p. 1-2)
Data Manipulation (p. 1-3) Properties and methods for data
Projects (p. 1-5) Properties and methods for project
Test Plans (p. 1-6) Properties and methods for test plan
Designs (p. 1-8) Properties and methods for design
Models (p. 1-12) Properties and me tho ds for model
Boundary Models (p. 1-21) Properties and methods for boundary
Functions to construct data, model and project objects; load projects; and find data file types.
objects
objects
objects
objects
objects
model objects
1 Function Reference

Object Creation

CreateBoundary
CreateData
CreateModel
CreateProject
DataFileTypes
LoadProject
modelinput
Create boundary model
Create data object
Create new model
Create project object
Data file types
Load mbcmodel.project
Create modelinput object
1-2

Data Manipulation

Data Manipulation
Data Properties (p. 1-3)
Data Methods (p. 1-4)

Data Properties

Filters
IsBeingEdited
IsEditable
Name
NumberOfRecords
NumberOfTests
Owner
RecordsPerTest
SignalNames
SignalUnits
TestFilters
UserVariables
Examine data objects
Work with data objects
Structure array holding user-defined filters
Boolean signaling if data or model is being edited
Boolean signaling whether data is editable
Name of object
Total number of records in data object
Total number of tests being used in model
Object from which data was received
Number of records in each test
Names of signals held by data
Names of units in data
Structure array holding user-defined test filters
Structure array holding user-defined variables
1-3
1 Function Reference

Data Methods

AddFilter
AddTestFilter
AddVariable
Append
BeginEdit
CommitEdi
DefineNumberOfRecordsPerTest
DefineTestGroups
ExportToMBCDataStructure
ImportFromFile
ImportFromMBCDataStructure
ModifyFilter
ModifyTestFilter
ModifyVariable
RemoveFilter
RemoveTestFilter
RemoveVariable
RollbackEdit
Value
t
Add user-defined filter to data set
Add user-defined test filter to data set
Adduser-definedvariabletodataset
Append data to data set
Begin editi
ng session on data object
Update temporary changes in data
Define exact number of records per test
Define rule-based test groupings
Export data to MBC data structure
Load data from file
Load data from MBC data structure
Modify user-defined filter in data set
Modify user-defined test filter in data set
Modify user-defined variable in data set
Remove user-defined filter from data set
Remove user-defined test filter from data set
Remove user-defined variable from data set
Undo most recent changes to data
Double data from data object
1-4

Projects

Projects
Project Properties (p. 1-5)
Project Methods (p. 1-5)

Project Properties

Data
Filename
Modified
Name
TestPlans
Project
CopyData
CreateData
CreateTestplan
Load
New
Remove
moveData
Re
ave
S
SaveAs
Methods
Examine project objects
Work with project objects
Array of data objects in project, boundary tree, or test plan
Full path to project file
Boolean signaling whether project has been modified
Name of object
Array of test plan objects in project
Create data object from copy of existing object
Create data object
Create new test plan
Load existing project file
Create new project file
ove project, test plan, model, or
Rem
undary model
bo
move data from project
Re
ave project
S
ave project to new f ile
S
1-5
1 Function Reference

Test Plans

Testplan Properties (p. 1-6)
Testplan M ethods (p. 1-6)

Testplan Properties

BestDesign
Boundary
Data
DefaultModels
Designs
Inputs
InputS
Input
Leve
Nam
Re
ignalNames
sPerLevel
ls
e
sponses
Examine test plan objects
Work w ith test plan objects
Best design in test plan
Get boundary model tree from test plan
Array of data objects in project, boundary tree, or test plan
Default models for test plan
Designs i
Inputs f model, d
Names o being m
Numbe model
Numb mode
Nam
Arr
an
pl
ntestplan
or test plan, model, boundary
esign, or constraint
f signals in data tha t are
odeled
r of inputs at each level in
er of levels in hierarchical
l
eofobject
ay of available responses for test
1-6

Testplan Methods

ddDesign
A
AttachData
BoundaryModel
dd design to test plan
A
ttach data from project to test plan
A
Get boundary model from test plan
Test P l ans
CreateDesign
CreateResponse
DetachData
FindDesign
InputSetupDialog
Remove
RemoveDesign
UpdateDesign
Create design object for test plan or model
Create new response model for test plan
Detach data from test plan
Find design by name
Open Input Setup dialog box to edit inputs
Remove project, test plan, model, or boundary model
Remove design from test plan
Update design in test plan
1-7
1 Function Reference

Designs

Design Properties (p. 1-8)
Design Methods (p. 1-9)
Generator Properties (p. 1-9)
Generator Methods (p. 1-10)
Candidate Set Properties (p. 1-10)
Candidate Set Methods (p. 1-10)
Design Constraint Properties (p. 1-10)
Design Constraint Methods (p. 1-11)
Design P
Constraints
Generator
Input
l (for designs)
Mode
e
Nam
mberOfInputs
Nu
mberOfPoints
Nu
oints
P
PointTypes
Style
Type (for designs and generators)
roperties
s
Examine design objects
Work with design objects
Examine design generator objects
Work with design generator objects
Examine design candidate set objects
Work with design candidate set objects
Examine d
Work wit
Constraints in design
Desig
Input model
Mode
Nam
Num
design object inputs
or
mber of design points
Nu
atrix of design points
M
ixed and free point status
F
Style of design type
Design type
esign constraint objects
h desig n constraint objects
n generation options
s for test plan, model, boundary
, design, or constraint
lfordesign
eofobject
ber of model, boundary model,
1-8

Design Methods

Designs
AddConstraint
Augment
ConstrainedGenerate
CreateCandidateSet
CreateConstraint
Discrepancy
FixPoint
Generate
getAlternativeTypes
Maximin
Merge
Minimax
OptimalCriteria
RemovePoints
Scatter2D
s
Add design constraint
Add design points
Generate constrained space-filling design of specified size
Create candidate set for optimal designs
Create design contraint
Discrepan
cy value
Fix design points
Generate new design points
Alternative model or design types
Maximum of minimum of distance between design points
Merge designs
Minimum of maximum distance between design points
Optimal de sign criteria (V, D, A, G)
Remove all nonfixed design points
ot design points
Pl

Generator Properties

umberOfInputs
N
Type (for designs and generators)
umber of model, boundary model,
N or design object inputs
Design type
1-9
1 Function Reference
Generator Metho
getAlternativeTypes
Properties (for design generators)
ds
Alternative model or design types
View and edit de properties

Candidate Set Properties

NumberOfInp
Type (for ca
uts
ndidate sets)
Number of mod or design ob
Candidate s

Candidate Set Methods

getAlter
Properti sets)
nativeTypes
es (for candidate
Alternat
View and edit candidate set properties

Design Constraint Properties

sign generator
el, boundary model,
ject inputs
et type
ive model or des ign types
1-10
Inputs
Name
NumberOfInputs
Type (for design constraints)
Inputs for test plan, model, boundary model, design, or constraint
Name of object
Number of model, boundary model, or design object inputs
Design constraint type
Designs
Design Constrai
Evaluate
getAlternati
MatchInputs
Properties (for design constraints)
veTypes
nt Methods
Evaluate model, design constra
Alternative m
Matchdesignconstraintinputs
View and edit design constraint properties
boundary model, or
int
odel or design types
1-11
1 Function Reference

Models

Hierarchical Models (p. 1-12)
Local Models (p. 1-13)
Response Models (p. 1-15)
Model Objects (p. 1-17)
Model Parameters (p. 1-19)
Model Properties (p. 1-20) Set model properties
Working with hierarchical models
Working with local models
Working with response models
Working with model objects
Examine model parameter objects

Hierarchical Models

Hierarchical Response Properties
InputSig
Level
LocalR
Name
Numbe
Resp
nalNames
esponses
rOfTests
onseSignalName
Names of s being mo
Level in
Array o
Name of
Total model
Name
g modeled
bein
ignals in data that are
deled
test plan of response
f local responses for response
object
number of tests being used in
of signal or response feature
1-12
rarchical Response Methods
Hie
AlternativeModelStatistics
CreateAlternativeModels
DoubleInputData
Summary statistics for alternative models
Create alternative models from model template
ata being used as input to model
D
Models
DoubleResponseData
Export
OutlierIndices
PEV
PredictedValue
Remove
SummaryStatistics
xregstatsmodel

Local Models

Local Response Properties
Data being used as output to model for fitting
Make command-line or Simulink
®
export model
Indices of DoubleInputData marked as outliers
Predicted error variance of model at specified inputs
Predicted value of model at specified inputs
Remove project, test plan, model, or boundary model
Summary statistics for response
Class for evaluating models and calculating PEV
InputSignalNames
Level
Name
NumberOfTests
ResponseFeatures(Local Response)
ResponseSignalName
Names of signals in data that are being modeled
Levelintestplanofresponse
Name of object
Total number of tests being used in model
Array of response features for local response
Name of signal or response feature being modeled
1-13
1 Function Reference
Local Response Methods
AlternativeModelStatistics
CreateAlternativeModels
CreateResponseFeature
DiagnosticStatistics
DoubleInputData
DoubleResponseData
Export
MakeHierarchicalResponse
mbcPointByPointModel
ModelForTest
OutlierIndices
OutlierIndicesForTest
PEV
PEVForTest
PredictedValue
PredictedValueForTest
Remove
Summary statistics for alternative models
Create alternative models from model template
Create new response feature for local model
Diagnostic statistics for response
Data being used as input to model
Data being used as output to model for fitting
Make command-line or Simulink export model
Build two-stage model from response feature models
Class for evaluating point-by-point models and calculating PEV
Model for specified test
Indices of DoubleInputData marked as outliers
Indicesmarkedasoutliersfortest
Predicted error variance of model at specified inputs
Local model predicted error variance for test
Predicted value of model at specified inputs
Predicted local model response for test
Remove project, test plan, model, or boundary model
1-14
Models
RemoveOutliers
RemoveOutliersForTest
RestoreData
RestoreDataForTest
SummaryStatistics
SummaryStatisticsForTest
UpdateResponseFeatures
xregstatsmodel
Local Model Properties
LocalModel Properties
ResponseFeatures(Local Model)

Response Models

Remove outliers in input d ata by index or rule, and refit models
Remove outliers on test by ind e x or rule and refit models
Restore removed outliers
Restore removed outliers for test
Summary statistics for response
Statistics for specified test
Refit response feature models
Class for evaluating models and calculating PEV
Edit local model properties
Set of response features for local model
Response Properties
AlternativeResponses
InputSignalNames
Level
Model Object
Name
Array of alternative responses for this response
Names of signals in data that are being modeled
Levelintestplanofresponse
Model object within response object
Name of object
1-15
1 Function Reference
NumberOfTests
ResponseSignalName
Response Methods
AlternativeModelStatistics
ChooseAsBest
CreateAlternativeModels
DiagnosticStatistics
DoubleInputData
DoubleResponseData
Export
OutlierIndices
PEV
PredictedValue
Remove
RemoveOutliers
RestoreData
Total number of tests being used in model
Name of signal or response feature being modeled
Summary statistics for alternative models
Choose best model from alternative responses
Create alternative models from model template
Diagnostic statistics for response
Data being used as input to model
Data being used as output to model for fitting
Make command-line or Simulink export model
Indices of DoubleInputData marked as outliers
Predicted error variance of model at specified inputs
Predicted value of model at specified inputs
Remove project, test plan, model, or boundary model
Remove outliers in input d ata by index or rule, and refit models
Restore removed outliers
1-16
Models
SummaryStatistics
xregstatsmodel
Summary statistics for response
Class for evaluating models and calculating PEV

Model Objects

Response objects contain an mbcmodel.model object with the following properties and methods.
Model Properties
FitAlgorithm
InputData
Inputs
IsBeingEdited
NumberOfInputs
OutputData
Parameters
Properties (for models)
Response
Status
Type (for models)
Units
Fit alg orithm for model or boundary model
Input data for model
Inputs for test plan, model, boundary model, design, or constraint
Boolean signaling if data or model is being edited
Number of model, boundary model, or design object inputs
Output (or response) data for model
Model parameters
View and edit model properties
Response for model object
Model status: fitted, not fitted or best
Valid model types
Model output units
1-17
1 Function Reference
Linear Model Methods
AliasMatrix
BoxCoxSSE
Correlation
Covariance
MultipleVIF
ParameterStatistics
PartialVIF
SingleVIF
StepwiseRegression
Model Methods
Alias matrix for linear model parameters
SSE and confidence interval for Box-Cox transformations
Correlation matrix for linear model parameters
Covariance matrix for linear model parameters
Multiple VIF m atrix for linear model parameters
Calculate parameter statistics for linear model
Partial VIF matrix for linear mod el parameters
Single VIF matrix for linear model parameters
Change stepwise selection s tatus for specified terms
1-18
CreateDesign
Evaluate
Export
Fit
getAlternativeTypes
Create design object for test plan or model
Evaluate model, boundary model, or design constraint
Make command-line or Simulink export model
Fit model or boundary model to new or existing data, and pro vide summary statistics
Alternative model or design types
Models
InputSetupDialog
Open Input Setup dialog box to edit inputs
Jacobian
Calculate Jacobian matrix for model at existing or new X points
ModelSetup
Open Model S etup dialog box where you can alter model type
PEV
Predicted error variance of model at specified inputs
PredictedValue
Predicted value of model at specified inputs
StatisticsDialog
SummaryStatistics
UpdateResponse
xregstatsmodel
Open summary statistics dialog box
Summary statistics for response
Replace model in response
Class for evaluating models and calculating PEV
Fit Algorithm Methods
An mbcmodel.fitalgorithm object is contained within the Properties property of an mbcmodel.model object.
CreateAlgorithm
getAlternativeNames
IsAlternative
SetupDialog
Create algorithm
List alternative algorithm names
Test alternative fit algorithm
Open f it algorithm setup dialog box

Model Parameters

These p roperties of the mbcmodel.modelparameters object are all read-only. An
mbcmodel.modelparameters object is contained within the Parameters
property of an mbcmodel.model object.
1-19
1 Function Reference
Model Parameters Properties
Names
NumberOfParameters
Values
Model parameter names
Number of included model parameters
Values of model parameters
Linear Model Properties
A mbcmodel.linearmodelparameters object is a mbcmodel.modelparameters object plus the following properties.
SizeOfParameterSet
StepwiseSelection
StepwiseStatus
Number of model parameters
Model parameters currently included and excluded
Stepwise status of parameters in model
RBF Model Properties
A mbcmodel.rbfmodelparameters object is a mbcmodel.linearmodelparameters object plus the following properties.
Centers
Widths
Centers of RBF model
Width data from RBF model
1-20

Model Properties

Linear Model Properties Methods
GetAllTerms
GetIncludedTerms
SetTermStatus
List all model terms
List included model terms
Set status of model terms

Boundary Models

Boundary Models
Boundary Classes (p. 1-21)
AbstractBoundary Properties (p. 1-22)
AbstractBoundary Methods (p. 1-22)
Model Properties (p. 1-23)
Model Meth
Boolean Properties (p. 1-23)
Boolean Methods (p. 1-24)
PointB
PointByPoint Methods (p. 1-25)
TwoStage Properties (p. 1-25)
oStage Methods (p. 1-26)
Tw
ods (p. 1-23)
yPoint Properties (p. 1-24)
Learn about boundary model objects
Examine parent boundary model objects
Work with parent boundary model objects
Examine base objects
Work with base boundary model objects
Examine boolean boundary model objects
Work wit
s
object
Examine point-by-point boundary model objects
Work with point-by-point boundary model objects
mine tw o-stage boundary model
Exa
ects
obj
Work with two-stage boundary model objects
boundary model
h boolean boundary model
Tree Properties (p. 1-26)
Tree Methods (p. 1-26)
TwoStageTree Properties (p. 1-27)

Boundary Class es

mbcboundary.AbstractBoundary
mbcboundary.Boolean
Examineboundarytreeobjects
Work with boundary tree objects
Examine two-stage boundary tree objects
Base boundary model class
Boolean b oundary model class
1-21
1 Function Reference
mbcboundary.Model
mbcboundary.PointByPoint
mbcboundary.Tree
mbcboundary.TwoStage
mbcboundary.TwoStageTree
Boundary model class
Point-by-point boundary model class
Boundary tree class
Two-stage boundary model class
Root boundary tree class in two-stage test plans

AbstractBoundary Properties

FitAlgorithm
Fitted
Inputs
Name
NumberOfInputs
Type (for boundary models)
Fit alg orithm for model or boundary model
Indicate whether boundary model has been fitted
Inputs for test plan, model, boundary model, design, or constraint
Name of object
Number of model, boundary model, or design object inputs
Boundary model type
1-22

AbstractBoundary Methods

CreateBoundary
designconstraint
Evaluate
getAlternativeTypes
Create boundary model
Convert boundary model to design constraint
Evaluate model, boundary model, or design constraint
Alternative model or design types
Boundary Models
Model Propertie
ActiveInputs
FitAlgorithm
Fitted
Inputs
Name
NumberOfI
Type (for
nputs
boundary models)

Model Methods

CreateBoundary
designconstraint
Evaluate
Fit
tAlternativeTypes
ge
s
Active boundary model inputs
Fit alg orithm for model or boundary model
Indicate whet has been fitt
Inputs for te model, desi
Name of obj
Number of m or design
Boundary model type
Create boundary model
Convert boundary model to design constraint
Evaluate model, boundary model, or design constraint
model or boundary model to
Fit
or existing data, and provide
new
mary statistics
sum
ternative model or design types
Al
her boundary model
ed
st plan, model, boundary
gn, or constraint
ect
odel, boundary model,
object inputs

Boolean Properties

itAlgorithm
F
Fitted
it alg orithm for model or boundary
F
odel
m
Indicate whether boundary model has been fitted
1-23
1 Function Reference
Inputs
Name
NumberOfInputs
Type (for boundary models)

Boolean Methods

CreateBoundary
designconstraint
Evaluate
getAlternativeTypes

PointByPoint Properties

FitAlgorithm
Fitted
Inputs
LocalBoundaries
LocalModel
Name
NumberOfInputs
Inputs for test plan, model, boundary model, design, or constraint
Name of object
Number of model, boundary model, or design object inputs
Boundary model type
Create boundary model
Convert boundary model to design constraint
Evaluate model, boundary model, or design constraint
Alternative model or design types
Fit alg orithm for model or boundary model
Indicate whether boundary model has been fitted
Inputs for test plan, model, boundary model, design, or constraint
Array of local boundary models for each operating point
Definition of local boundary model
Name of object
Number of model, boundary model, or design object inputs
1-24
Boundary Models
OperatingPoints
Type (for boundary models)

PointByPoint Methods

CreateBoundary
designconstraint
Evaluate
getAlternativeTypes

TwoStage Properties

FitAlgorithm
Fitted
GlobalModel
Inputs
LocalModel
Name
NumberOfInputs
Type (for boundary models)
Model operating point sites
Boundary model type
Create boundary model
Convert boundary model to design constraint
Evaluate model, boundary model, or design constraint
Alternative model or design types
Fit alg orithm for model or boundary model
Indicate whether boundary model has been fitted
Interpolating global boundary model definition
Inputs for test plan, model, boundary model, design, or constraint
Definition of local boundary model
Name of object
Number of model, boundary model, or design object inputs
Boundary model type
1-25
1 Function Reference
TwoStage Method
CreateBoundary
designconstraint
Evaluate
getAlterna
getLocalBo
tiveTypes
undary

Tree Properties

BestMode
Data
InBest
Models
TestPlan
l
s
Create boundary model
Convert boundary model to design constraint
Evaluate mode design const
Alternative
Local bound point
Combined
Array of boundar
Boundary mo dels selected as best
Arrayofboundarymodels
Test plan containing boundary tree
y tre e, or test plan
l, boundary model, or
raint
model or design types
ary model for operating
best boundary models
data objects in project,
1-26
Tree
Methods
Add
CreateBoundary
Remove
pdate
U
Add boundary model to tree and fit to test plan data
Create boundary model
move project, test plan, model, or
Re
undary model
bo
Update boundary model in tree and fittotestplandata

TwoStageTree Properties

Boundary Models
BestModel
Global
InBest
Local
Response
TestPlan
Combined best boundary models
Global boundary model tree
Boundary mo dels selected as best
Local bounda
Response for
ry model tree
model object
Test plan containing boundary tree
1-27
1 Function Reference
1-28
2

Commands — Alphabetical List

ActiveInputs
Purpose Active boundary model inputs
Syntax B.ActiveInputs = [X]
Description ActiveInputs is a property of mbcboundary.Model.
B.ActiveInputs = [X] sets the active inputs for the boundary model. X is a logical row vector indicating which inputs to use to fit a boundary.
You can build boundary models using subsets of input factors and then combine them for the most accurate boundary. This approach can provide more effective results than i ncluding all inputs.
Examples To make a boundary model using only the first two inputs:
B.ActiveInputs = [true tr ue false false];
See Also “Boundary Models” on page 1-21
2-2
Purpose Add boundary model to tree and fit to test plan data
Syntax B = Add(Tree,B)
B = Add(Tree,B,InBest)
Description This is a method of mbcboundary.Tree.
B = Add(Tree,B) adds the boundary model to the tree and fits the
boundary model to the test plan data. object, B is a new boundary model object. The boundary model must have the same inputs as the boundary tree. The boundary model is always fitted when you add it to the boundary tree. This fitting ensures that the fitting data is compatible with the test plan data. The method returns the fitted boundary model.
B = Add(Tree,B,InBest) adds and fits the boundary model, and InBest specifies whether to include the boundary model in the best
boundary model for the boundary tree. By default, the best model includes the new boundary model.
Tree is an mbcboundary.Tree
Add
See Also Update, Remove, CreateBoundary, “Boundary Models” on page 1-21
2-3
AddConstraint
Purpose Add design constraint
Syntax D = AddConstraint(D,c)
Description AddConstraint is a method of mbcdoe.design.
D = AddConstraint(D,c) adds constraint c to the design. You must
call
AddConstraint to apply the constraint and remove points outside
the constraint.
If
c is a boundary model, AddConstraint also converts the boundary
model object to a
See Also CreateConstraint
mbcdoe.designconstraint object.
2-4
Purpose Add design to test plan
Syntax D = AddDesign(T,D)
D = AddDesign(T,Level,D) D = AddDesign(T,Level,D,Parent)
Description AddDesign is a method of mbcmodel.testplan.
D = AddDesign(T,D)
D = AddDesign(T,Level,D)
D = AddDesign(T,Level,D,Parent)
is the array of designs to be added to the test plan, T.
D
Level is the test plan level. By default the level is the outer level (i.e.,
Level 1 for One-stage, Level 2 (global) for Two-stage).
Parent is the parent design in the design tree. By default designs
are added to the top level of the design tree. See information on the design tree.
AddDesign
Designs for more
In order to ensure that the design names are unique in the test plan, thedesignnamewillbechangedwhenaddingadesigntoatestplan if a design of the same name already exists. The array of designs with modifiednamesisanoutput.
Examples To add three designs to the test plan global (2) level:
D = AddDesign(TP, [sfDesign, parkedCamsDesign, mainDesign])
See Also UpdateDesign; RemoveDesign; FindDesign
2-5
AddFilter
Purpose Add user-defined filter to data set
Syntax D = AddFilter(D, expr)
Description This is a method of mbcmodel.data.
A filter is a constraint on the data set used to exclude some records. You define the filter using logical operators or a logical function on the existing variables.
D is the mbcmodel.data object you want to filter.
expr is an input string holding the expression that defines the filter.
Examples AddFilter(D, 'AFR < AFR_C ALC + 10');
The effect of this filter is to keep all records where AFR < AFR_CALC +10.
AddFilter(D, 'MyFilterFunction(AFR, RPM, TQ, SPK)');
The effect of this filter is to apply the function MyFilterFunction using the variables AFR, RPM, TQ, S PK.
All filter functions receive an return an record to keep, and false (or
nx1 logical array out. In that array, true (or 1) indicates a
nx1 vector for each variable and must
0) indicates a record to discard.
See Also ModifyFilter, RemoveFilter, Filters, AddTestFi lter,
ModifyTestFilter
2-6
Purpose Adduser-definedtestfiltertodataset
Syntax D = AddTestFilter(D, expr)
Description This is a method of mbcmodel.data.
A test filter is a constraint on the data set used to exclude some entire tests. You define the test filter using logical operators or functions on the existing variables.
D is your data object.
expr is the input string holding the definition of the n ew test filter.
Examples AddTestFilter(d1, 'any(n>1000)');
The effect of this filter is to in clude all tests in w hi ch all records have speed (
Similar to filters, test filter functions are iteratively evaluated o n each test, receiving an return an record to keep, and false (or
n) greater than 1000.
nx1 vector for e ach variable input in a test, and must
1x1 logical array out. In that array, true (or 1) indicates a
0) indicates a test to discard.
AddTestFilter
AddTestFilter(data, 'length(LOGNO) > 6');
The effect of this filter is to include all tests with more than 6 records.
See Also ModifyTestFilter, RemoveTestFilter, TestFilters, AddFilter
2-7
AddVariable
Purpose Adduser-definedvariabletodataset
Syntax D = AddVariable(D, expr, units)
Description This is a method of mbcmodel.data.
You can define new variables in termsofexistingvariables. Notethat variable names are case sensitive.
D is your data object.
expr is the input string holding the definition of the new variable.
units is an optional input string holding the units of the variable.
Examples AddVariable(D, 'MY_NEW_VARIABLE = TQ*AFR/2');
AddVariable(D, 'funcVar = MyVariableFunction(TQ, AFR, RPM)', 'lb'); AddVariable(D, 'TQ=tq');
The last example could be useful if the signal names in the data do not match the model input factor names in the test plan template file.
See Also ModifyVariable, RemoveVariable, UserVariables
2-8
Purpose Alias matrix for linear model parameters
Syntax A = M.AliasMatrix
Description This is a method of mbcmodel.linearmodel.
A = M.AliasMatrix calculates the alias m atrix for the linear model
parameters (where
M is a linear model).
Examples A = AliasMatrix(knot_model)
See Also ParameterStatistics
AliasMatrix
2-9
AlternativeModelStatistics
Purpose Summary statistics for alternative models
Syntax S = AlternativeModelStatistics(R)
S = AlternativeModelStatistics(R,
Description This is a method of all model objects: mbcmodel.hierarchicalresponse,
mbcmodel.localresponse and mbcmodel.response.
Name)
This returns an array ( model fits, to be used to select the best model. These are the summary statistics seen in the list view at the bottom o f the Model Browser GUI in any model view.
You must use CreateAlternativeModels before you can compare the alternative responses using AlternativeModelStatistics. Then use ChooseAsBest.
R is the model object whose alternative response models you want to
compare. response (
S is a structure containing Statistics and Names fields.
S.Statistics is a matrix of size (number alternative responses x
number of statistics).
S.Names is a cell array containing the names of all the statistics.
Theavailablestatisticsvaryaccordingtowhatkindofparentmodel (two-stage, local, response feature or response) produced the alternative models, and include PRESS RMSE, RMSE, and Two-Stage RMSE.
All the available statistics are calculated unless you specify which you want. You can specify only the statistics you require using the following form:
R could be a local (L), response feature (R) or hierarchical HR) model.
S) of summary statistics of all the alternative
2-10
S = AlternativeModelStatistics(R, Name)
This returns a double matrix containing only the statistics specified in
Name.
AlternativeModelStatistics
Note that you use SummaryStatistics to examine the fit of the current model, and alternative child models.
Examples S = AlternativeModelStatistics(R);
See Also CreateAlternativeModels, SummaryStatistics, ChooseAsBest
AlternativeModelStatistics to examine the fit of several
2-11
AlternativeResponses
Purpose Array of alternative responses for this response
Syntax altR = R.AlternativeResponses
Description This is a property of the response model object, mbcmodel.response (R).
It returns a list of alternative responses used for one-stage or response feature models.
Examples R = testplan.Responses;
TQ = R(1); AR = TQ.AlternativeResponses;
See Also LocalResponses, ResponseFeatures(Local Response)
2-12
Purpose Append data to data set
Syntax D = Append(D, otherData)
Description This is a method of mbcmodel.data.
Append
You can use this to add new data to your existing data set,
otherData is the input argument holding the extra data to add below
the existing d ata . This argument can either be an or a double array. The behavior is different depending on the type.
If
otherData is an mbc model.data object then Append will look for
common
SignalNames are found then a error will be thrown. Any common
signals will be filled with
otherData is a double array then it must have exactly the same
If number of columns as there are
vertcat (vertical concatenation) is app lied between the existing data
and
SignalNames between the two sets of data. If no common
Appended to the existing data and other signals will be
NaN.
SignalNames in the data, and a simple
otherData.
Examples Append(D, CreateData('aDataFile.xls'));
Append(D, rand(10,100));
See Also CreateData
D.
mbcmodel.data object
2-13
AttachData
Purpose Attach data from project to test plan
Syntax newD = AttachData(T, D, Property1, Value, Property2, Value...)
Description This is a m ethod of mbc model.testplan. Use it to attach the data you
want to model to the test plan.
T is the test plan object, D is the data object.
The following table shows the valid properties and their corresponding possible values. The first five are optional property/value pairs to control how the data is matched to a design. These are the settings shown in the last page of the Data Wizard (if there is a design) in the Model Browser. For more information on the meaning of these settings, refer to the Data Wizard section (under Data) in the Model Brow ser User’s Guide.
The
usedatarange property changes the test plan input ranges to the
range of the data.
2-14
Note If the testplan has responses set up the models are fitted when you attach data.
Property Value Default
unmatcheddata
moredata
moredesign
tolerances [1xNumInputs
usedatarange
When you attach data to a test plan the Name property of the test plan inputs is used to select data channels. If the Name is empty then the
{’all’, ’none’}
{’all’, ’closest’}
{’none’, ’closest’}
double]
logical
'all'
'all'
'none'
ModelRange/20
false
AttachData
Symbol is used as the Name. If the N ame does not exist in the data set, an error is generated.
When a test plan has data attached, it is only possible to change the symbols, ranges or nonlinear transforms of the test plan inputs.
Examples TouseallthedatainDATA in the test plan TESTPLAN and set the input
ranges to the data range:
newD = AttachData(TESTPLAN, DATA,'usedatarange',true);
To match data DATA to the best design in testplan TESTPLAN within specified tolerances:
tol = [0.075, 100, 1, 2]; unmatch = 'all'; moredata = 'all'; moredes = 'none'; AttachData(testplan, data ,...
'tolerances', tol,... 'unmatcheddata', unmatch,... 'moredata', moredata,... 'moredesign', moredes);
You can use AttachData to use data from one project in another project, as follows:
p1 = mbcmodel.LoadProject( filename ); p2 = mbcmodel.LoadProject( p1.Testplan.AttachData( p2.Data );
See Also Data, CreateData, DetachData
filename2 );
2-15
Augment
Purpose Add design points
Syntax D = Augment(D,Numpoints)
D = Augment(D,'Prop1',value1,...)
Description Augment is a method of mbcdoe.design. Use it to add points to a design
using a specified design generator. After augmenting a design, the design augmentation, as in the Design Editor.
D = Augment(D,Numpoints) augments the design with the number of
points specified by
D = Augment(D,'Prop1',value1,...) augments the design with the
generator specified by the generator property value pairs.
Style is set to Custom unless an optimal design is used for
Numpoints using the current generator settings.
You can use the
Augment method to add points to an existing type
using a different design type.
OptDesign = Augment(OptDesign,...
'Type','V-optimal',... 'MaxIterations',200,... 'NoImprovement', 50,... 'NumberOfPoints',20);
To set all designs points to fixed and then augment an existing design optimally, use the
OptDesign = FixPoints(OptDesign); OptDesign = Augment(OptDesign,...
'Type','V-optimal',... 'MaxIterations',200,... 'NoImprovement', 50,... 'NumberOfPoints',20);
FixPoints method to fix all the points as follows:
When augmenting with an optimal design generator existing points which are not fixed may be changed. To add points optimally and keep only fixed points, use
RemovePoints before augmenting, e.g.,
2-16
Augment
OptDesign = RemovePoints(OptDesign,'free'); OptDesign = Augment(OptDesign,...
'Type','V-optimal',... 'MaxIterations',200,... 'NoImprovement', 50,... 'NumberOfPoints',20);
To get a candidate set object for use with an optimal design:
C = CreateCandidateSet(OptDesign,'Type', 'Grid',...
'NumberOfLevels',[21 21 21]);
You see an error if you try to call Augment when the design Style is User-defined or Experimental data.
Examples To create a candidate set and then optimally augment a design with 10
points:
CandidateSet = augmentedDesign.CreateCandidateSet... ( 'Type', 'Grid' ); CandidateSet.NumberOfLevels = [21 21 21 21]; augmentedDesign = Augment( augmentedDesign,...
'Type', 'V-optimal',... 'NumberOfPoints', 10,... 'CandidateSet', CandidateSet,... 'MaxIterations', 200,... 'NoImprovement', 50 );
See Also Generate; CreateCandidateSet
2-17
BeginEdit
Purpose Begin editing session on data object
Syntax D = BeginEdit(D)
Description This is a method of mbcmodel.data.
You must call this method before you can make any changes to a data object.
There are no input arguments. You must call attempting to modify your data object ( any way. An error will be thrown if this condition is not satisfied. Data which cannot be edited (see
BeginEdit is called.
D in the example below) in
IsEditable) will throw an error if
BeginEdit before
Examples BeginEdit(D);
See Also CommitEdit, RollbackEdit, IsEd itab le, IsBeingEdited
2-18
BestDesign
Purpose Best design in test plan
Syntax T.BestDesign{Level} = d;
Description BestDesign is a property of mbcdmodel.testplan.
T.BestDesign{Level} = d; sets d as the best design, where Level is
the test plan level. There can be one best design fo r each level, but the best global (2) level design is used for matching to data when you call
AttachData.
BestDesign is a cell array with a cell per level. the best design for the first level and for the second level.
TP.BestDesign{2} is best design
Examples To set the design globalDesign as the best design at the global (2) level:
T.BestDesign{2} = globalDesign
See Also CreateDesign
TP.BestDesign{1} is
2-19
BestModel
Purpose Combined best boundary models
Syntax mbcboundary.Tree.BestModel
Description This is a property of mbcboundary.Tree and
mbcboundary.TwoStageTree.
mbcboundary.Tree.BestModel returns the combined boundary model
containing all best boundary models in the tree (read only).
BestModel is the boundary model com bining the models selected as best.
You can select which boundary models to include in the best model with
InBest. If the best boundary model includes more than one boundary
model, that boundary model is an
TwoStageTree objects, the BestModel property contains the best
For boundary model (local, global, and response) (read only). In this case,
BestModel is the boundary model combining the best local, global and
response boundary models. You can s elect which boundary models to include in the best model with includes more than one boundary model, that boundary model is an
mbcboundary.Boolean object.
mbcboundary.Boolean object.
InBest. If the best boundary model
See Also InBest
2-20
Boundary
Purpose Get boundary model tree from test plan
Syntax BoundaryTree = mbcmodel.testplan.Boundary
Description Boundary is a property of mbcmodel.testplan.
BoundaryTree = mbcmodel.testplan.Boundary returns the boundary
tree for the test plan. The boundary models you create. object.
Examples To get the boundary tree from the test plan Boundary property:
BoundaryTree = mbcmodel.testplan.Boundary
See Also CreateBoundary, mbcboundary.Tree, mbcboundary.Model
BoundaryTree is a container for all the
BoundaryTree is an mbcboundary.Tree
2-21
BoundaryModel
Purpose Get boundary model from test plan
Syntax Best = BoundaryModel (T)
Best = BoundaryModel (T, Type)
Description BoundaryModel is a method of mbcmodel.testplan.
Best = BoundaryModel (T) returns the best boundary model
for the test plan, of
mbcboundary.AbstractBoundary: mbcboundary.Mod el, mbcboundary.Boolean, mbcboundary.PointByPoint,or mbcboundary.TwoStage.
Note Before Release 2009b, Bou ndaryModel returned an
mbcdoe.designconstraint object. Use designconstraint to convert a
boundary to a design constraint.
Best = BoundaryModel (T, Type) is the best boundary model for the
specified type associated with the test plan. following values:
T. Best is a boundary model subclass
Type can be any of the
'all': B est boundary model for all inputs (default)
'local' : Best local boundary model
'global' : Best global boundary m odel
Examples To load boundary constraints from another project file and add to
design:
otherProject = mbcmodel.LoadProject( [matlabroot,'\toolbox\...
mbc\mbctraining\Gasoline_project.mat']);
boundaryConstraints = otherProject.Testplans(1).Boundary.Global.BestModel
Design.Constraints = boundaryConstraints;
2-22
When you add the constraints to the design, the boundary model object converts automatically to an
See Also Boundary, CreateBoundary
BoundaryModel
mbcdoe.designconstraint.
2-23
BoxCoxSSE
Purpose SSE and confidence i nterval for Box-Cox transformations
Syntax [sse, ci, lambda] = Box CoxS SE(Model, lambda)
[sse, ci, lambda] = Box CoxS SE(Model) BoxCoxSSE(Model, ...)
Description This is a method of mbcmodel.linearmodel.
[sse, ci, lambda] = Box CoxS SE(Model, lambda) computes the sum
of squares error ( model under different Box-Cox transforms (as g iv en by the parameter
lambda). The data used is that which was used to fit the model. sse is a
vectorthesamesizeas difference between the Box-Cox transforms where
[sse, ci, lambda] = Box CoxS SE(Model) If lambda is not specified,
then default values for are used and these are returned in third output argument.
BoxCoxSSE(Model, ...) If no output arguments are requested then a
plot of SSE versus lambda is displayed. The confidence intervals are also displayed on this plot.
sse) and confidence interval (ci) for values of the
lambda an d ci is a scalar. There is no statistical
sse le ss than ci.
Examples To try several different values, of the Box-Cox parameter and plot the
results:
lambda = -3:0.5:3;
[sse, ci] = BoxCoxSSE( M, lambda);
semilogy( lambda, sse, 'bo-', lambda([1,end]), [ci, ci], 'r--' );
xlabel( 'Box-Cox parameter, \lambda' );
ylabel( 'SSE' );
Note that BoxCoxSSE does not set a Box -C ox transform in the model. To do this use:
M.Properties.BoxCox = 0; [S,M] = M.Fit;
See Also ParameterStatistics
2-24
Purpose Centers of RBF model
Syntax centers = params.Centers
Description This is a property of mbcmodel.rbfmodelparameters,forRadial
Basis Function (RBF) models only. This returns an array of size number_of_centers by number_of_variables.
Examples centers = params.Centers;
See Also Widths
Centers
2-25
ChooseAsBest
Purpose Choose best model from alternative responses
Syntax ChooseAsBest(R, Index)
Description This is a method of the response model object, mbcmodel.response.
This is the same function as selecting the best model in the Model Selection window of the Model Browser GUI. For a local model
MakeHierarchicalResponse performs a similar function.
R is the object containing the respon se model.
Index is the number of the response model you want to choose as best.
Use
AlternativeResponses to find the index for each response model,
and u se AlternativeModelStatistics to choose the best fit.
Examples ChooseAsBest(R, AlternativeModel)
RMSE = AlternativeModelStatistics(R, 'RMSE'); [mr, Best] = min(RMSE); ChooseAsBest(R, Best);
See Also AlternativeResponses, AlternativeModelSt atistics,
DiagnosticStatistics, MakeHierarchicalResponse
2-26
Purpose Update temporary changes in data
Syntax D = CommitEdit(D)
Description This is a method of mbcmodel.data.
Usethistoapplychangesyouhavemade to the data, such as creating new variables and applying filters to remove unwanted records.
There are no input arguments. Once you have finished editing your data object can only be committed if both
CommitEdit will throw an error if these conditions are not met.
D you must commit your changes back to the project. Data
IsEditable and IsBeingEdited are true.
Examples D = P.Data;
BeginEdit(D); AddVariable(D, 'TQ = tq', 'lbft'); AddFilter(D, 'TQ < 200'); DefineTestGroups(D, {'RPM' 'AFR'}, [50 10], 'MyLo gNo' ); CommitEdit(D);
CommitEdit
ForanexamplesituationwhichresultsinCommitEdit failing:
D = p.Data; D1 = p.Data; BeginEdit(D1); tp = p.'Testplan; Attach(tp, D);
Where p is an mbcmodel.project object, and D and D1 are
mbcmodel.data objects.
At this point to the test plan and hence can only be modified from the test plan. If you now enter:
OK = D1.IsEditable
the answer is false.
IsEditable(D1) becomes false because it is now Attached
2-27
CommitEdit
If you now enter:
CommitEdit(D1);
An error is thrown because the data is no longer editable. The error message informs you that the data may have been attached to a test plan and can only be edited from there.
See Also BeginEdit, RollbackEdit, IsE dita ble, IsBeingEdited
2-28
ConstrainedGenerate
Purpose Generate constrained space-filling design of specified size
Syntax design = ConstrainedGenerate( design, NumPoints,
'UnconstrainedSize', Size, 'MaxIter', NumIterations )
design = ConstrainedGenerate( design, NumPoints, OPTIONS )
Description ConstrainedGenerate is a method of mbcdoe.design.Useitto
generate a space-filling design of specified size within the constrained region. This method only works for space-filling designs. It may not be possible to achieve a specified number of points, depending on the generator settings and constraints.
design = ConstrainedGenerate( design, NumPoints, 'UnconstrainedSize', Size, 'MaxIter', NumIterations )
to generate a design with the numb er of constrained points specified by
NumPoints. You can supply parameter value pairs for the options
or you can use a structure:
NumPoints, OPTIONS )
MaxIter — Maximum iterations. Default: 10
design = ConstrainedGenerate( design,
.
tries
UnconstrainedSize — Total number of points in unconstrained
design. Default: Nu mPoints
The algorithm
Generate, and updates the UnconstrainedSize using the following
ConstrainedGenerate produces a sequence of calls to
formula:
UnconstrainedSize = ceil(UnconstrainedSize * NumPoints/D.NumberOfPoints);
Examples With ConstrainedGenerate, make a 200 point design, using an existing
space-filling design number of points:
sfDesign = ConstrainedGenerate( sfDesign, 200, 'UnconstrainedSize', 800, 'MaxIter',10 );
% How did we do?
finalNumberOfPoints = sfDesign.NumberOfPoints
sfDesign, and inspect the constrained and total
2-29
ConstrainedGenerate
% How many points did we need in total?
totalNumberOfPoints = sfDesign.Generator.NumberOfPoints
finalNumberOfPoints =
200
totalNumberOfPoints =
839
See Also CreateConstraint; Generate
2-30
Purpose Constraints in design
Syntax Constraints = D.Constraints
Description Constraints is a property of mbcdoe.design.
Constraints = D.Constraints Designs have a Constraints property,
initially this is empty:
constraints = design.Constraints
constraints = 0x0 array of mbcdoe.design constraint
Use CreateConstraint to form constraints.
See Also CreateConstraint; AddConstraint
Constraints
2-31
CopyData
Purpose Create data object from copy of existing object
Syntax newD = CopyData(P, D)
newD = CopyData(P, Index)
Description This is a method of mbcmodel.project.
Use this to duplicate data, for example if you want to make changes for further modeling but want to retain the existing data set. You can refer to the data object either by name or index.
P is the project object.
D is the data object y ou want to copy.
Index is the index of the data object you want to copy.
Examples D2 = CopyData(P1, D1);
See Also Data, CreateData, RemoveData
2-32
Purpose Correlation matrix for linear model parameters
Syntax STATS = Correlation(LINEARMODEL)
Description This is a method of mbcmodel.linearmodel.
STATS = Correlation(LINEARMODEL) calculates the correlation matrix
for the linear model parameters.
Examples Stats = Correlation(knot_model)
See Also ParameterStatistics
Correlation
2-33
Covariance
Purpose Covariance matrix for linear model parameters
Syntax STATS = Covariance(LINEARMODEL)
Description This is a method of mbcmodel.linearmodel.
STATS = Covariance(LINEARMODEL) calculates the covariance matrix
for the linear model parameters.
Examples Stats = Covariance(knot_model)
See Also ParameterStatistics
2-34
CreateAlgorithm
Purpose Create algorithm
Syntax newalg = alg.CreateAlgorithm( AlgorithmName)
Description This is a method of mbcmodel.fitalgorithm.
newalg = alg.CreateAlgorithm( AlgorithmName) creates an
algorithm of the specified type.
AlgorithmName must be in the list of alternative algorithms given by alg.getAlternativeNames.
To change the fit algorithm for a model:
>> mdl = mbcmodel.CreateM odel('Polynomial', 2); >> minpress = mdl.FitAlgorithm.CreateAlgorithm('Minimize PRESS'); >> mdl.FitAlgorithm = minp ress;
The Algorit hmNa me determines what properties you can set. You can display the properties for an algorithm as follows:
>> mdl.FitAlgorithm.properties
alg is a mbcmodel.fitalgorithm object.
Algorithm: Minimize PRESS Alternatives: 'Least Squares','Forward Selection','Backward Selection','Prune'
MaxIter: Maximum Iterations (int: [ 1,1000])
As a simpler alternative to using CreateAlgorithm, you can assign the algorithm name directly to the algorithm. For example:
B.FitAlgorithm.BoundaryPointOptions = 'Boundary Only';
Or:
m.FitAlgorithm = `Minimize PRESS';
Case and spaces are ignored. See FitAlgorithm.
The following sections list the properties available for each algorithm type.
2-35
CreateAlgorithm
Linear Model Algorithm Properties
Linear Models Algorithms
Used by polynomials, hybrid splines and as the StepAlgorithm for RBF algorithms.
Algorithm: Least Squares
Alternatives:
Selection','Prune'
Algorithm: Minimize PRESS
Alternatives:
Selection','Prune'
MaxIter: Maximum Iterations (int: [1,1000])
Algorithm: Forward Selection
Alternatives:
Selection','Prune'
ConfidenceLevel: Confidence level (%) (numeric: [70,100])
MaxIter: Maximum Iterations (int: [1,1000])
RemoveAll: Remove all terms first (Boolean)
Algorithm: Backward Selection
'Minimize PRESS','Forward Selection','Backward
'Least Squares','Forward Selection','Backward
'Least Squares','Minimize PRESS','Backward
2-36
Alternatives:
Selection','Prune'
ConfidenceLevel: Alpha (%) (numeric: [70,100])
MaxIter: Maximum Iterations (int: [1,1000])
IncludeAll: Include all terms first (Boolean)
Algorithm: Prune
Alternatives:
Selection','Backward Selection'
'Least Squares','Minimize PRESS','Forward
'Least Squares','Minimize PRESS','Forward
CreateAlgorithm
Criteria (PRESS RMSE|RMSE|GCV|Weighted
PRESS|-2logL|AIC|AICc|BIC|R^2|R^2 adj|PRESS R^2|DW|Cp|cond(J))
MinTerm s: Min imum number of terms (int: [0,Inf])
Tolerance (numeric: [0,1000])
IncludeAll: Include all terms before prune (Boolean)
Display (Boolean)
RBF Algorithm Properties
For information about any of the RBF and Hybrid RBF algorithm properties, see “Radial Basis Functions”, and especially “Fitting Routines” in the Model Browser User’s Guide.
Algorithm: RBF Fit
WidthAlgori t hm: Width selection algori th m (mbcmodel.fitalgorithm)
StepAlgorithm: Stepwise (mbcmodel.fitalgorithm)
Width Selection Algorithms
Alternatives: 'WidPerDim','Tree Regression'
Algorithm: TrialWidths
NestedFitAlgorithm: Lambda selection algorithm
(mbcmodel.fitalgorithm)
Trials: Number of trial widths in each zoom (int: [2,100])
Zooms: Number of zooms (int: [1,100])
MinWidth: Initial lower bound on width (numeric:
[2.22045e-016,1000])
MaxWidth: Initial upper bound on width (numeric:
[2.22045e-016,100])
PlotFlag: Display plots (Boolean)
2-37
CreateAlgorithm
PlotProgress: Display fit progress (Boolean)
Algorithm: WidPerDim
Alternatives:
NestedFitAlgorithm: Lambda selection algorithm
(mbcmodel.fitalgorithm)
DisplayFlag: Display (Boolean)
MaxFunEvals: M aximum number of test widths (int: [1,1e+006])
PlotProgress: Display fit progress (Boolean)
Algorithm: Tree Regression
Alternatives:
MaxNumRectangles: Maximum number of panels (int: [1,Inf])
MinPerRectangle: Minimum data points per panel (int: [2,Inf])
RectangleSize: Shrink panel to data (Boolean)
AlphaSelectAlg: Alpha selection algorithm (mbcmodel.f ita lgorithm)
Lambda Selection Algorithms
Algorithm: IterateRidge
Alternatives:
CenterSelectionAlg: Center selection algorithm
(mbcmodel.fitalgorithm)
'TrialWidths','Tree Regression'
'TrialWidths','WidPerDim'
'IterateRols','StepItRols'
2-38
MaxNumIter: M aximum number of updates (int: [1,100])
Tolerance: Minimum change in log10(GCV) (numeric:
[2.22045e-016,1])
NumberOfLambdaValues: Number of initial test values for lambda
(int: [ 0,100])
CreateAlgorithm
CheapMode: Do not reselect centers for new width (Boolean)
PlotFlag: Display (Boolean)
Algorithm: IterateRols
Alternatives:
CenterSelectionAlg: Center selection algorithm
(mbcmodel.fitalgorithm)
MaxNumIter: Maximum number of iterations (int: [1,100])
Tolerance: Minimum change in log10(GCV) (numeric:
[2.22045e-016,1])
NumberOfLambdaValues: Number of initial test values for lambda
(int: [ 0,100])
CheapMode: Do not reselect centers for new width (Boolean)
PlotFlag: Display (Boolean)
Algorithm: StepItRols
Alternatives:
MaxCenters: Maximum number of centers (evalstr)
PercentCandidates: Percentage of data to be candidate centers
(evalstr)
StartLambdaUpdate: Number of centers to add before updating (int:
[1,Inf])
'IterateRidge','StepItRols'
'IterateRidge','IterateRols'
Tolerance: Minimum change in log10(GCV) (numeric:
[2.22045e-016,1])
MaxRep: Maximum number of times log10(GCV) change is minimal
(int: [ 1,100])
Center Selection Algorithms
Algorithm: Rols
2-39
CreateAlgorithm
Alternatives: 'RedErr','WiggleCenters','CenterExchange'
MaxCenters: Maximum number of centers (evalstr)
PercentCandidates: Percentage of data to be candidate centers
Tolerance: Regularized error tolerance (numeric: [2.22045e-016,1])
Algorithm: RedErr
(evalstr)
Alternatives:
MaxCenters: Number of centers (evalstr)
Algorithm: WiggleCenters
Alternatives:
MaxCenters: Number of centers (evalstr)
PercentCandidates: Percentage of data to be candidate centers
(evalstr)
Algorithm: CenterExchange
Alternatives:
MaxCenters: Number of centers (evalstr)
NumLoops: Number of augment/reduce cycles (int: [1,Inf])
NumAugment: Number of centers to augment by (int: [1,Inf])
Tree Regression Algorithms
Algorithm: Trial Alpha
Alternatives:
'Rols','WiggleCenters','CenterExchange'
'Rols','RedErr','CenterExchange'
'Rols','RedErr','WiggleCenters'
'Specify Alpha'
2-40
AlphaLowerBound: Initial lower bound on alpha (numeric:
[2.22045e-016,Inf])
CreateAlgorithm
AlphaUpperBound: Initial upper bound on alpha (numeric:
[2.22045e-016,Inf])
Zooms: Number of zooms (int: [1,Inf])
Trials: T rial alphas per zoom (int: [2,Inf])
Spacing: Spacing (Linear|Logarimthic)
CenterSelectAlg: Center selection algorithm (m bcmodel.fitalgorithm)
Algorithm: Specify Alpha
Alternatives:
Alpha: Width scale parameter, alpha (numeric: [2.22045e-016,Inf])
NestedFitAlgorithm: Center selection algorithm
(mbcmodel.fitalgorithm)
Algorithm: Tree-based Center Selection
Alternatives:
ModelSelectionCriteria: Model selection criteria (BIC|GCV)
MaxNumberCenters: Maximum number of centers (evalstr)
Algorithm: Generic Center Selection
Alternatives:
CenterSelectAlg: Center selection algorithm (m bcmodel.fitalgorithm)
'Trial Alpha'
'Generic Center Selection'
'Tree-based Center Selection'
Hybrid RBF Algorithms
Algorithm: RBF Fit
WidthAlgori t hm: Width selection algori th m (mbcmodel.fitalgorithm)
StepAlgorithm: Stepwise (mbcmodel.fitalgorithm)
2-41
CreateAlgorithm
Width Selection Algorithms
Algorithm: TrialWidths
NestedFitAlgorithm : Lambda and term sele ction algorithm
Trials: Number of trial widths in each zoom (int: [2,100])
Zooms: Number of zooms (int: [1,100])
MinWidth: Initial lower bound on width (numeric:
MaxWidth: Initial upper bound on width (numeric:
PlotFlag: Display plots (Boolean)
PlotProgress: Display fit progress (Boolean)
Nested Fit Algorithms
Algorithm: Twostep
(mbcmodel.fitalgorithm)
[2.22045e-016,1000])
[2.22045e-016,100])
2-42
Alternatives:
MaxCenters: Maximum number of centers (evalstr)
PercentCandidates: Percentage of data to be candidate centers
(evalstr)
StartLambdaUpdate: Number of terms to add before updating (int:
[1,Inf])
Tolerance: Minimum change in log10(GCV) (numeric:
[2.22045e-016,1])
MaxRep: Maximum number of times log10(GCV) change is minimal
(int: [ 1,100])
PlotFlag: Display (Boolean)
Algorithm: Interlace
'Interlace'
CreateAlgorithm
Alternatives: 'Twostep'
MaxParameters: Maximum number of terms (evalstr)
MaxCenters: Maximum number of centers (evalstr)
PercentCandidates: Percentage of data to be candidate centers
(evalstr)
StartLambdaUpdate: Number of terms to add before updating (int:
[1,Inf])
Tolerance: Minimum change in log10(GCV) (numeric:
[2.22045e-016,1])
MaxRep: Maximum number of times log10(GCV) change is minimal
(int: [ 1,100])
Boundary Model Fit Algorithm Parameters
The following sections list the available fit algorithm parameters for command-line boundary models. The boundary model fit algorithm parameters have the same fit optionsastheBoundaryEditorGUI. For instructions on using these fit options, see “Boundary Model Fit Options” in the Model Browser documentation.
Ellipsoid
Algorithm: Constraint Fitting
BoundaryPointOptions: Boundary Points (mbcmodel.fitalgorithm)
The boundary points algorithm uses optimization to find the best ellipse. These options are from
Algorithm: Boundary Points
Display: Display (none|iter|final)
MaxFunEvals: Maximum function evaluations (int: [1,Inf])
MaxIter: Maximum iterations (int: [1,Inf])
TolFun: Function tolerance (numeric: [1e-012,Inf])
fmincon.
2-43
CreateAlgorithm
TolX: Variable tolerance (numeric: [1e-012,Inf])
TolCon: Constraint tolerance (numeric: [1e-012,Inf])
Star-shaped
Algorithm: Constraint Fitting
SpecialPointOptions: Special Points (mbcmodel.fitalgorithm)
BoundaryPointOptions: Boundary Points (mbcmodel.fitalgorithm)
ConstraintFitOptions: Constraint Fit (mbcmodel.fitalgorithm)
Star-shaped—Special Points
Algorithm: Star-shaped Points
CenterAlg: Center (mbcmodel.fitalgorithm)
Algorithm alternatives: ’Mean’, ’Median’, ’Mid Range’, ’Min Ellipse’, ’User Defined’
For User Defined only: CenterPoint: User-defined center [X1,X2] (vector: NumberOfActiveInputs)
Star-shaped—Boundary Points
You can choose to find boundary points (use Interior) or to assume that all points are on the boundary (use algorithm then has manual and auto options for the dilation radius and ray casting algorithms.
Boundary Only). The interior
2-44
Algorithm: Boundary Only (no further options)
Algorithm: Interior. Further options:
- Dilation Radius (mbcmodel.fitalgorithm)
Algorithm: Auto
Algorithm: Manual
radius: Radius (numeric: [0,Inf])
- RayCasting (mbcmodel.fitalgorithm)
Algorithm: From data
CreateAlgorithm
Algorithm: Manual
nrays: Number of Rays (int: [1,Inf])
Star-shaped—Constraint Fit
Algorithm: Star-shaped RBF Fit
Further options:
Transform (None|Log|McCallum)
KernelOpts: RBF Kernel (mbcmodel.fitalgorithm)
Kernel algorithms can be: wendland, m ultiquadric, recmultiquadric, gaussian, thinplate, logisticrbf. linearrbf, cubicrbf.
You can specify widths and continuity as sub-properties of particular RBF kernels.
- You can set widths for wendland, multiquadric, recmultiquadric,
gaussian, logisticrbf. Width: RBF Width (numeric: [1.49012e-008,Inf])
You can set Continuity for wendland. Cont: RBF Continuity (0|2|4|6)
RbfOpts: RBF Algorithm (m b cm odel.fitalgorithm)
Algorithm: Interpolation. The following are additional settings for interpolating RBF.
- CoincidentStrategy: Coincident Node Strategy
(Maximum|Minimum|Mean)
- Algorithm: Algorithm (Direct|GMRES|BICG|CGS|QMR)
- Tolerance: Tolerance (numeric: [0,Inf])
- MaxIt: Maximum number of iterations (int: [1,Inf])
Examples First get a fitalgorithm object, F, from a model:
M = mbcmodel.CreateModel('Polynomial', 4); F = M.FitAlgorithm
2-45
CreateAlgorithm
Then, to create a new algorithm type:
The Algorit hmNa me determines what properties you can set. You can display the properties for an algorithm as follows:
F= Algorithm: Least Squares Alternatives: 'Minimize PRESS','Forward Selection','Backward Selection','Prune' 1x1 struct array with no fields.
Alg = CreateAlgorithm(F, 'Minimize PRESS')
Alg = Algorithm: Minimize PRESS Alternatives: 'Least Squares','Forward Selection','Backward Selection','Prune'
MaxIter: 50
2-46
>> mdl.FitAlgorithm.properties
Algorithm: Minimize PRESS Alternatives: 'Least Squares','Forward Selection','Backward Selection','Prune'
MaxIter: Maximum Iterations (int: [ 1,1000])
As a simpler alternative to using CreateAlgorithm, you can assign the algorithm name directly to the algorithm. For example:
B.FitAlgorithm.BoundaryPointOptions = 'Boundary Only';
Or:
m.FitAlgorithm = `Minimize PRESS';
Case and spaces are ignored.
CreateAlgorithm
See Also getAlternativeNames, SetupDialog, FitAlgorithm
2-47
CreateAlternativeModels
Purpose Create alternative models from model template
Syntax R = CreateAlternativeModels(R, modeltemplate, criteria)
R = CreateAlternativeModels(R, modellist, criteria R = CreateAlternativeModels(R, LocalModels,LocalCriteria,GlobalModels,GlobalCriteria)
Description This is a method of all model objects: mbcmodel.hierarchicalresponse,
mbcmodel.localresponse and mbcmodel.response.
This is the same as the Build Models function in the Model Browser GUI. A selection of child node models are built. The results depend on where you call this method from. Note that the hierarchical model is automatically constructed when for a local model.
This option makes alternative response feature models for each
response feature.
R = CreateAlternativeModels(R, models, criteria)
CreateAlternativeModels is called
2-48
- Models is the list of models. You can use a model template
file (
.mbm) created in the Model Browser, or a cell array of
mbcmodel.model objects.
- Criteria is the selection criteria for best model (from the statistics
available from
This option makes a lternative local models as well as alternative
response feature models.
R = CreateAlternativeModels(R, LocalModels,LocalCriteria,GlobalModels,GlobalCriteria)
AlternativeModelStatistics).
- LocalModels is the list of local models - you must pass in an
empty matrix).
- LocalCriteri a is 'Two-Stage RMSE'.
CreateAlternativeModels
- GlobalModels is the list of global models (from the model
template).
- GlobalCriter ia is the selection criteria for best model.
You construct a model template file (such as Model Browser. From any response (global or one-stage model) with alternative responses (child nodes), select Model > Make Template. You can save the child node model types of your currently selected modeling node as a m odel template. Alternatively from any response click Build Models in the toolbar and create a series of alternative response models in the dialog.
Examples mymodels = 'mymodels.mbm';
mlist = {}; load('-mat', mymodels); critera = 'PRESS RMSE'; CreateAlternativeModels(R, [], 'Two-Stage RMSE', mlist, criteria);
Note that the model template contains the variable mlist.
CreateAlternativeModels( RESPONSE, 'alternative_models.mbm', 'Weighted PRESS' )
creates alternative response feature models based upon the model template file based upon each model’s Weighted PRESS statistic.
alternative_models.mbt, and chooses the best model
See Also AlternativeModelStatistics
'mymodels.mbm')inthe
2-49
CreateBoundary
Purpose Create boundary model
Syntax B = mbcboundary.CreateBoundary(Type,Inputs)
B = mbcboundary.CreateBoundary(Type,Inputs,Property,Va lue,
...) B = CreateBoundary(Tree) B = CreateBoundary(Tree,Type) B = CreateBoundary(Tree,Type,Property,Value,...) newboundary = CreateBoundary(B,Type) newboundary = CreateBoundary(B,Type,Property,Value,...)
Description B = mbcboundary.CreateBoundary(Type,Inputs) This syntax is a
static package function that creates an the specified
Type,whereInputs is an mbcmodel.modelinput object.
Use this function to create a new boundary model object independent of any project. See
B= mbcboundary.CreateBoundary(Type,Inputs,Property,Value,...)
Fit for an alternative.
creates a boundary with the spec if ied properties. Properties depend on the boundary model type.
mbcboundary.Model object (B)of
2-50
You can use or see
getAlternativeTypes to get a list of valid model types,
Type (for boundary models). Spaces and case in Type are
ignored.
CreateBoundary is also a method of mbcboundary.Tree.Usethe
method to create a new boundary model within a project.
B = CreateBoundary(Tree) creates a new boundary model, B,from
the
mbcboundary.Tree object, Tree. The method uses the test plan
inputs to define the boundary model inputs. You must call
Addto add
thenewmodeltothetree.
B = CreateBoundary(Tree,Type) creates a new boundary model, B of
the specified
B = CreateBoundary(Tree,Type,Property,Value,...) creates a
Type.
boundary with the specified properties.
CreateBoundary
CreateBoundary is also a method of mbcboundary.AbstractBoundary
and all its subclasses. Use the method to create a new boundary model from an existing boundary model.
newboundary = CreateBoundary(B,Type) creates a new boundary
model, model
newboundary = CreateBoundary(B,Type,Property,Value,...)
creates a new boundary model with specified properties.
Examples You can create a boundary model outside of a project in either of the
following ways:
To create a new boundary model within a project:
newboundary, with the same inputs as the current boundary
B. You can get a list of valid types with getAlternative Types.
B = mbcboundary.Fit(Data,Type);
B = mbcboundary.CreateBoundary(Type,Inputs)
Tree = testplan.Boundary B = CreateBoundary(Tree)
This creates a new boundary model, B,fromthembcboundary.Tree object, Tree. The method uses the test plan inputs to define the boundary model inputs.
To create a star-shaped global boundary model for a testplan:
B = CreateBoundary(testplan.Boundary.Global,'Star-shaped ');
Call Add to add the boundary model to the tree. .
To add the boundary model to the test plan, and fit the boundary model:
B = Add(testplan.Boundary.Global,B);
The best boundary model for the tree includes this boundary model.
To create boundary models for a point-by-point test plan:
2-51
CreateBoundary
B = TP.Boundary.Local.CreateBoundary('Point-by-point'); % Use convex hull type for the local boundaries B.LocalModel = CreateBoundary(B.LocalModel,'Convex hull'); % Add point-by-point boundary model to project. TP.Boundary.Local.Add(B);
See Also “Boundary Models” on page 1-21, Type (for boundary models), Fit,
getAlternativeTypes, mbcboundary.Model, mbcboundary.Tree
2-52
CreateCandidateSet
Purpose Create candidate set for optimal designs
Syntax D = CreateCandidateSet(D)
D = CreateCandidateSet(D,prop1,value1,...)
Description CreateCandidateSet is a method of mbcdoe.design. Candidate sets
are very similar to design generators. They are not used directly in specifying a design but are used to specify the set of all possible points to be considered as part of an optimal design. You obtain the candidate set from an o ptimal design generator or by using
mbcdoe.design.CreateCandidateSet.
D = CreateCandidateSet(D) creates a candidate set
(
mbcdoe.candidateset object) for the design.
D = CreateCandidateSet(D,prop1,value1,...) creates a candidate
set with the specified properties for the design. To see the properties you can set, see the table of candidate set properties, Candidate Set Properties (for Optimal Designs) on page 2-195.
Examples CandidateSet = augmentedDesign.CreateCandidateSet( 'Type',...
'Grid' );
CandidateSet.NumberOfLevels = [21 21 21 21];
See Also Properties (for candidate sets); Augment
2-53
CreateConstraint
Purpose Create design contraint
Syntax c = CreateConstraint(D)
c = CreateConstraint(D,prop1,val1,...)
Description CreateConstraint is a method of mbcdoe.design.
Designs have a Constraints property, initially this is empty:
constraints = design.Constraints
constraints = 0x0 array of mbcdoe.design constraint
Use CreateConstraint to form constraints.
c = CreateConstraint(D) creates a default constraint for the design.
c = CreateConstraint(D,prop1,val1,...) creates a constraint with
the specified properties. See Constraint Properties on page 2-198.
2-54
By default a 1D table constraint is created for designs with two or more inputs.
For a design with one input a linear constraint is created by default.
You can specify the constraint type during creation by using the property, e.g.,
c = D.CreateConstraint('Type','Linear')
Other available properties depend on the design type. See the table Constraint Properties on page 2-198.
This method does not add the constraint to the de sign . You must explicitly add the constraint to the design using the Constraints property of the design e.g.,
D= AddConstraint(D,c)
or
Type
CreateConstraint
D.Constraints(end+1) = c;
You must call AddConstraint to apply the constraint and re m ove design points outside the constraint.
Examples To create a Linear constraint, add it to a design, and regenerate the
design points:
cLinear = design.CreateConstraint( 'Type', 'Linear' ); cLinear.A = [-2.5e-4, 1]; cLinear.b = 0.25; cLinear design.Constraints = cLinear; design = Generate(design);
To create and apply a 1D Table constraint:
cTable1d = design.CreateConstraint( 'Type', '1D Table' ); cTable1d.Table = [0.9 0.5] ; cTable1d.Breakpoints = [500 6000]; cTable1d design.Constraints = cTable1d; design = Generate(design);
To combine constraints, use an array of the constraints you want to apply:
design.Constraints = [cLinear, cTable1d]; constraints = design.Constraints design = Generate(design);
constraints = 1x2 array of mbcdoe.design constraint Linear design constraint: -0.00025*N + 1*L <= 0.25 1D Table design constraint: L(N) <= Lmax
2-55
CreateConstraint
To load boundary constraints from another project file and add to design:
otherProject = mbcmodel.LoadProject( [matlabroot,'\toolbox\... mbc\mbctraining\Gasoline_project.mat']); boundaryConstraints = otherProject.Testplans(1).BoundaryModel... ('global'); Design.Constraints = boundaryConstraints;
See Also Properties (for design constraints); AddConstraint
2-56
CreateData
Purpose Create data object
Syntax D = CreateData(P, filename, filetype)
D = mbcmodel.CreateData(filename, filetype)
Description The first syntax is a method of mbcmodel.project. Use this to create a
new data object in an existing project.
filename and filetype are optional arguments that are used to load
data from a file into the new data object at creation time.
filename is a string specifying the full path to the file.
filetype is a string specifying the file type. See DataFileTypes for the
specification of al lowed file types (and specify your own data loading function). If then MBC will attempt to infer the fil e type from the file extension, i.e. if the file extension is .xls then MBC will try the Exce l File Loader.
If
filename isnotprovidedthennodatawillbeloadedintothenew
data object. Data can be load ed subsequently using provided that editing of the data object has been enabled via a call to
BeginEdit.CallCommitEdit to apply edits.
P is the project object.
mbccheckindataloadingfcn to
filetype is not provided,
ImportFromFile,
If you create the data object specifying a property is set to the filename. However, if you use ImportFromFile after creation to load data from a file, the name of the data object does not change.
The second syntax is a function. Use this to create a new data object independent of any project. You can use AttachData to use the data object in another test plan, e.g.,
d = mbcmodel.CreateData( filename ); testplan.AttachData( d );
filename, then the Name
Examples data = CreateData(P, 'D:\MBCWork\data1.xls');
D = mbcmodel.CreateData; D = mbcmodel.CreateData('D:\MBCWork\data.xls');
2-57
CreateData
Where P is an mbcmodel.project object.
See Also DataFileTypes, BeginEdit, CopyData, RemoveData, Data,
ImportFromFile, CommitEdit, AttachData
2-58
CreateDesign
Purpose Create design object for test plan or model
Syntax D = CreateDesign(Testplan)
D = CreateDesign(Testplan,Level) D = CreateDesign(Testplan,Level,prop1,value1,...) D = CreateDesign(Model) D = CreateDesign(Model,prop1,value1,...) D = CreateDesign(Inputs) D = CreateDesign(Inputs,prop1,value1,...) D = CreateDesign(Design)
Description CreateDesign is a method of mbcmodel.testplan, mbcmodel.model,
and
mbcmodel.modelinput. Property value pairs can be specified
at creation time. The property value pairs are properties of
mbcdoe.design.
Properties of
mbcdoe.design
mbcdoe.design Property
Constraints
Generator
Inputs
Model
Points
PointTypes
Style
NumberOfInputs
Description
Constraints in design.
Design generation options.
Inputs for design.
Model for design.
Matrix of design points.
Fixed a nd free point status.
Style o f design type.
Read-only — Number of model inputs.
2-59
CreateDesign
Properties of mbcdoe.design (Continued)
mbcdoe.design Property
NumberOfPoints
Description
Read-only — Number of design points.
Type
Design type. The design property
Type can only be specified
with
CreateDesign and is
subsequently read-only for design objects.
D = CreateDesign(Testplan) creates a design for the test plan, where Testplan is an mbcmodel.testplan object.
D = CreateDesign(Testplan,Level) creates a design for the specified
level of the test plan. By default the level is the outer level (i.e., Level 1 for one-stage, Level 2 (global) for two-stage).
If you do not specify any properties, the method creates a default design type. The default design types are a Sobol Sequence for two or more inputs, and a Full Factorial for a single input.
D = CreateDesign(Testplan,Level,prop1,value1,...) creates a
design with the specified properties.
D = CreateDesign(Model) creates a design based on the inputs of
the
mbcmodel.model object, Model.
2-60
D = CreateDesign(Model,prop1,value1,...) creates a design with
the specified properties based on the inputs of the model.
D = CreateDesign(Inputs) creates a desig n based on the inputs of the mbcmodel.modelinput object, Inputs.
D = CreateDesign(Inputs,prop1,value1,...) creates a design with
the specified properties based on the inputs.
D = CreateDesign(Design) creates a copy of an existing design.
Examples To create a space-filling d esign for a test plan TP:
sfDesign = CreateDesign(TP, ...
'Type', 'Latin Hypercube Sampling',... 'Name', 'Space Filling');
Create an optimal design based on the inputs of a model:
optimalDesign = CreateDesign( model,...
'Type', 'V-optimal',... 'Name', 'Optimal Design' );
Create a classical full factorial design based on the inputs defined by a
mbcmodel.modelinput object:
design = CreateDesign( inputs, 'Type', 'Full Factorial' );
Create a new design based on an existing design (Ac tual Design)in order to augment it:
CreateDesign
augmentedDesign = ActualDesign.CreateDesign('Name',...
'Augmented Design');
Create a local level design for the two-stage test plan TP:
localDesign = TP.CreateDesign(1,'Type',... 'Latin Hypercube Sampling');
Create a global level design for the two-stage test plan TP:
globalDesign = TP.CreateDesign(2, 'Type',...
'Latin Hypercube Sampling');
See Also Generate; modelinput
2-61
CreateModel
Purpose Create new model
Syntax M = mbcmodel.CreateModel(Type, INPUTS)
NewModel = CreateModel(model,Type)
Description M = mbcmodel.CreateModel(Type, INPUTS) This syntax is a function
that creates an
mbcmodel.linearmodel and mbcmodel.localmodel are subclasses of mbcmodel.model. Model types that begin with the word “local” specify
an
mbcmodel.localmodel object.
NewModel = CreateModel(model,Type) This syntax is a function that
creates a new model (of the specified Type) with the same inputs as an existing getAlternativeTypes to generate a list of valid model types. See
(for models)
are ignored.
INPUTS can be a mbcmodel.modelinput object, or any valid input to the mbcmodel.modelinput constructor. See modelinput.
mbcmodel.model object of the specified Type.
model. model is an mbcmodel.model object. You can use
for a list of valid model types. Spaces and case in Type
Type
Examples To create a hybrid spline with four input factors, enter:
M = mbcmodel.CreateModel('Hybrid Spline', 4)
To create an RBF wi th four input factors, enter:
Inputs = mbcmodel.modelinput('Symbol',{'N','L','EXH','IN T'}' ,...
'Name',{'ENGSPEED','LOAD','EXHCAM','INTCAM'}',... 'Range',{[800 5000],[0.1 1],[-5 50],[-5 50]}');
RBFModel = mbcmodel.CreateModel( 'RBF', Inputs);
To create a polynomial with the same input factors as the previously created RBF, enter:
PolyModel = CreateModel(RBFModel,'Polynomial')
2-62
CreateModel
See Also getAlternativeTypes, modelinput, CreateProject, CreateData, Type
(for models)
2-63
CreateProject
Purpose Create project object
Syntax P = mbcmodel.CreateProject
Description This is a function that creates an mbcmodel.project object.
P is the project object.
P = mbcmodel.CreateProject creates an mbcmodel.proj ect
called Untitled. P = mbcm odel.CreateProject( NAME ) creates an
mbcmodel.project called NAME.
Examples P = mbcmodel.CreateProject;
Create a project called MBT_Project:
P = mbcmodel.CreateProject( 'MBT_Project' );
2-64
Purpose Create new response model for test plan
Syntax R = CreateResponse(T, Varname)
R = CreateResponse(T, Varname, Model) R = CreateResponse(T, Varname, LocalModel, GlobalModel) R = CreateResponse(T, Varname, LocalModel, GlobalModel,
DatumType)
Description This is a method of mbcmodel.testplan.
R = CreateResponse(T, Varname) creates a model of the variable Varname using the test plan’s one- or two-stage default models. T is the
test plan object,
R = CreateResponse(T, Varname, Model) creates a one-stage model
of
Varname,whereT must be a one-stage test plan object.
R = CreateResponse(T, Varname, LocalModel, GlobalModel) or R = CreateResponse(T, Varname, LocalModel, GlobalModel, DatumType)
two-stage test plan object. model type permits a datum model. Only the model types “Polynomial Spline” and “Polynomial with Datum” permit datum models.
R is the new response object.
creates a two-stage model of Varname. T must be a
DatumType can only be specified if the local
CreateResponse
Varname isthevariablenameforthenewresponse.
Model is the One-stage model object (if you leave this field empty, the
default is used).
LocalModel is the Local Model object (if you leave this field empty,
the default is used).
GlobalModel is the Response Feature model object (if you leave this
field empty, the default is used).
DatumType can be 'None' 'Maximum' 'Minimum' or 'Linked'.
Examples To create a response using the default models, enter:
R = CreateResponse(T, 'torque'); TQ_response = CreateResponse(testplan, 'TQ');
2-65
CreateResponse
To create a response and specify the local and global model types, enter:
See Also Responses
mdls = T.DefaultModels LocalModel = CreateModel(mdl{1}, 'Local Polynomial Spline'); GlobalModel = CreateModel(mdl{2}, 'RBF'); R = CreateResponse(T, 'TQ', LocalModel, GlobalModel, 'Maximum')
2-66
Loading...