主要内容

CreateTestplan

Create new test plan

    Description

    TPObj = CreateTestplan(PrjObj,TestPlanTemplate) creates a test plan.

    example

    TPObj = CreateTestplan(PrjObj,TestPlanTemplate,newtestplanname) creates a test plan with a name.

    TPObj = CreateTestplan(PrjObj,InputsPerLevel) creates a test plan with the number of inputs per level.

    TPObj = CreateTestplan(PrjObj,InputsPerLevel,newtestplanname) creates a test plan with the inputs per level and a name.

    TPObj = CreateTestplan(PrjObj,Inputs) creates a test plan with the number of inputs.

    TPObj = CreateTestplan(PrjObj,Inputs,newtestplanname) creates a test plan with the number of inputs and a name.

    Examples

    collapse all

    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}); 

    Input Arguments

    collapse all

    Input information, specified as a cell array. The input information can be specified as a cell array of mbcmodel.model input objects (one for each level), or as a cell array of cell arrays (one for each level).

    Number of inputs for each stage, specified as a row vector.

    Optional name for the new test plan object, specified as a character vector.

    Template and test plan name and path, specified as a character vector. The test plan template file is created in the Model Browser.

    Existing project, specified as a project object.

    Output Arguments

    collapse all

    New test plan, returned as a project object.

    More About

    collapse all

    Version History

    Introduced before R2006a