|
|
|
| R2012a Documentation → Model-Based Calibration Toolbox | |
Learn more about Model-Based Calibration Toolbox |
|
| Contents | Index |
| On this page… |
|---|
Data can be loaded and merged from files, from the workspace, and from tailor-made Excel sheets, as described in the following sections.
A test plan can only use a single data set, so if you want to use more than one source file, you need to use the merge functions to combine data variables in order to incorporate desired variables into one model.
Note that you can also write your own data-loading functions. See Data Loading Application Programming Interface. This includes a description of the correct structure for importing data from the workspace. This is the same structure of data as when you export to the workspace.
From the project node choose Data > New Data. The Data Editor appears.
Click the Open File button in the toolbar
to load data
from a file.
Alternatively, choose File > Import > File.
The Data Import Wizard appears, to help you select a file.
Alternatively, from the test plan node,
Select TestPlan > Select Data. The Data Wizard appears.
Click Load new data set and the Data Import Wizard appears.
To import data from a file, enter the file pathname in the edit box, or use the Browse button to find and select the data file. Double-click to load the file.
The drop-down menu contains the file types recognized by the Model Browser (Excel, Delimited text files, MATLAB). The default Auto tries to determine the type of file by looking at the file extension. For text files, see Text File Formats.
For Excel files with multiple sheets, you must next select the sheet you want to use and click OK.
The Import Wizard now displays a summary screen showing the total number of records and variables imported, and you can view each variable's range, mean, standard deviation, and units in the list box. You can edit variable names and units in this list. Click Finish to accept the data, unless you have data to merge. See Merging Data.
The Data Import Wizard disappears and the view returns to the Data Editor (or the Data Wizard if you are selecting data from a test plan — see Data Selection Wizard).
If you already have some data loaded, you cannot click Finish but must click Next instead. This brings you to the data merging screen of the wizard.
Here you must choose one of the radio buttons:
Merge extra channels (more variables)
Merge extra records (more data, same variables)
Overwrite old data (use only the new data)
Click Next. The wizard summary screen appears, showing the results of the merge. You can click <Prev to go back and change merging options.
Click Finish to accept the data and return to the Data Editor.
Select Delimited Text File from the Open As list to read delimited text files into MBC. These files can be delimited by tabs, |, commas or spaces. They may optionally contain a variable name header and units header line.
Select Delimited Text Sweep File from the Open As list to read delimited text files with multiple blocks of data into MBC. These files can be delimited by tabs, |, commas or spaces. Each block of data may optionally contain a variable name header and units header line. The first block's names and headers are used, subsequent rows of non-numeric data are stripped out. The data can be split into multiple blocks where each block contains data for a separate sweep. Within each block, a column that consists of a value in the first row and empty values in the remaining rows for initial columns will be assumed as meaning that for these columns each row should take its value from the first row in the block. Note that the data is imported as a single array and you must use the Test Groupings window to decide how to sort the data into sweeps. See Test Groupings.
From the project node choose Data > New Data.
The Data Editor appears.
You can import variables from the MATLAB workspace by choosing File > Import > Workspace.
The Loading Data from Workspace dialog box appears.

Variables in the workspace are displayed in hierarchical form in the top left pane.
The number of records and variables appears in the Output Data pane. You can add variables (one at a time) as many times as you like (as long as there are no name conflicts; suffixes "_1" are added to repeated names).
You can double click to edit variable names and units.
You can use the Remove button to remove selected variables one at a time from the right list, or click or Remove all to remove all variables at once.
Click OK to accept the data to import and return to the Data Editor.
If you already have data loaded, the Data Merging Wizard appears, where you must choose one of three radio buttons:
Merge extra channels (more variables)
Merge extra records (more data, same variables)
Overwrite old data (use only the new data)
Click Next. The wizard summary screen appears, showing the results of the merge. You can click <Prev to go back and change merging options.
Note Obviously the merge might not succeed if the data sets do not contain the same variables. A message appears if the merge is impossible when you click Next, and you must make another choice. |
Click Finish to accept the data and return to the Data Editor.
The Data Editor can create a tailor-made Excel sheet for you to fill with data and then import. This sheet will be in the format the Data Editor expects to import data.
Excel is opened with a new sheet created, containing the labeled rows Name, Unit, and Data.
Copy your data and variable names into this sheet, then click Next in the wizard to import into the Data Editor.
If the data has been entered in the columns in a way that the Data Editor expects, a summary screen shows you information about the numbers, ranges, means, units, and standard deviations of the records and variables you can import.
![]() | The Data Editor | Creating Variables | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |