Products & Services Solutions Academia Support User Community Company

Learn more about Model-Based Calibration   

AddVariable - Add user-defined variable to data set

Syntax

D = AddVariable(D, expr, units)

Description

This is a method of mbcmodel.data.

You can define new variables in terms of existing variables. Note that 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

  


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