Products & Services Solutions Academia Support User Community Company

Learn more about Model-Based Calibration   

CreateTestplan - Create new test plan

Syntax

T = CreateTestplan(P, TestPlanTemplate)
T = CreateTestplan(P, TestPlanTemplate, newtestplanname)
T = CreateTestplan(P, InputsPerLevel)
T = CreateTestplan(P, InputsPerLevel, newtestplanname)
T = CreateTestplan(P, Inputs)
T = CreateTestplan(P, Inputs, newtestplanname)

Description

This is a method of the mbcmodel.project object.

You can use this method with a test plan template or input information.

You set templates up in the Model Browser GUI. This setup includes number of stages, inputs, base models, and designs. If the test plan is used as part of a previous project it is also possible to save response models in the test plan. It is not possible to change the number of stages after creation of the test plan.

After you create a new test plan, you can add data to model, and new responses. Note that the model input signal names specified in the template must match the signal names in the data.

Use CreateTestplan in the following ways:

T = CreateTestplan(P, TestPlanTemplate)

T = CreateTestplan(P, TestPlanTemplate, newtestplanname)

P is the project object.

TestPlanTemplate is the full name and path to the test plan template file created in the Model Browser.

newtestplanname is the optional name for the new test plan object.

T = CreateTestplan(P, InputsPerLevel)

T = CreateTestplan(P, InputsPerLevel, newtestplanname)

InputsPerLevel is a row vector with number of inputs for each stage.

T = CreateTestplan(P, Inputs)

T = CreateTestplan(P, Inputs, newtestplanname)

Inputs is a cell array with input information for each level. The input information can be specified as a cell array of mbcmodel.modelinput objects (one for each level), or as a cell array of cell arrays (one for each level).

Examples

To create a test plan using a test plan template, enter:

T = CreateTestplan(P1, 'd:\MBCwork\TQtemplate1', 'newtestplan')
testplan = CreateTestplan(P, 'example_testplan')

To create a test plan using inputs per level, enter:

T = P.CreateTestplan([1,2])

To specify the input information in a cell array of mbcmodel.modelinput objects, enter:

% Define Inputs for test plan
LocalInputs = mbcmodel.modelinput('Symbol','S',...
    'Name','SPARK',...
    'Range',[0 50]);
GlobalInputs = mbcmodel.modelinput('Symbol',{'N','L','ICP',...
'ECP'},'Name',{'SPEED','LOAD','INT_ADV','EXH_RET'},...
    'Range',{[500 6000],[0.0679    0.9502],[-5 50],[-5 50]});
% create test plan
testplan = CreateTestplan( project, {LocalInputs,...
GlobalInputs} );

Or

T = P.CreateTestplan({LocalInputs,GlobalInputs})

To specify the input information in a cell array, enter:

localInputs = {'S',0,50,'','SPARK'};           
globalInputs = {'N',   800, 5000, '', 'ENGSPEED'
           'L',   0.1,    1, '', 'LOAD'
           'EXH',  -5,   50, '', 'EXHCAM'
           'INT',  -5,   50, '', 'INTCAM'};

T = CreateTestplan(P,{localInputs,globalInputs}); 

See Also

AttachData, CreateResponse, Responses, Data, Levels, InputSignalNames, InputsPerLevel, Inputs, modelinput

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS