Products & Services Solutions Academia Support User Community Company

Learn more about Model-Based Calibration   

AttachData - Attach data from project to test plan

Syntax

newD = AttachData(T, D, Property1, Value, Property2, Value...)

Description

This is a method of mbcmodel.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 Browser User's Guide.

The usedatarange property changes the test plan input ranges to the range of the data.

PropertyValueDefault

unmatcheddata

{'all', 'none'}

'all'

moredata

{'all', 'closest'}

'all'

moredesign

{'none', 'closest'}

'none'

tolerances

[1xNumInputs double]

ModelRange/20

usedatarange

logical

false

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 Symbol is used as the Name. If the Name 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

To use all the data in DATA 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( filename2 );
p1.Testplan.AttachData( p2.Data );

See Also

Data, CreateData, DetachData

  


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