| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Model-Based Calibration |
| Contents | Index |
| Learn more about Model-Based Calibration |
| On this page… |
|---|
You create variables by doing the following:
Clicking the
toolbar button
Selecting Tools > Variables > Add
Alternatively, by selecting an existing Variable List view by clicking in it, then pressing Insert
The Variable Editor appears. See below for instructions.
You can also load user-defined variables from Storage.
New variables you create in the Variable Editor can be viewed in the Data Editor by using the right-click menu in any view to select Current View > Variable List. Alternatively, select the menu item View > Split View > Variable List to add this new view to the currently selected plot.
You can edit existing variables
Directly, by select-clicking in the Variable Expression pane or pressing F2 (as in renaming in Windows Explorer)
By double-clicking, which opens the Variable Editor
By choosing Tools > Variables > Edit
You can delete variables by selecting them in the Variable Expression pane and pressing Delete
You can define new variables in terms of existing variables:
Define the new variable by writing an equation in the edit box at the top of the Variable Editor dialog box.
You can type directly in the edit box or add variable names by double-clicking them. In the case of variable names especially, this latter method avoids typing mistakes. Variable names are case sensitive.

The preceding example shows a definition for a new variable called POWER that is defined as the product of two existing variables, tq and n, by entering POWER = tq x n.
Click OK to add the new variable to the current data set.
Note The computation of variable values is vectorized (see Vectorization in the MATLAB Getting Started Guide ) and occurs prior to filtering and clustering. The result must be either a vector the same length as the dataset or a scalar, in which case the value is repeated for every record. The intention is that variables are used on a record-by-record basis. |
Note that the Variable Editor looks different depending on whether you opened it to create a new variable or edit an existing one. The example above shows the editor when adding a new variable. If you open the editor to edit a variable there is an additional list on the left. You can choose which of your existing variables to edit from this list, or click the button to add a new item to the list if you want to add a new variable.
![]() | Data Loading and Merging | Creating Filters | ![]() |

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 |