| 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 |
D = CreateData(P, filename, filetype) D = mbcmodel.CreateData(filename, filetype)
The first syntax is a method of mbcmodel.project. Use this to create a new data object in an existing project. P is the project object.
filename and filetype are optional arguments that are used to load data from a file into the new data object at creation time.
filename is a string specifying the full path to the file.
filetype is a string specifying the file type. See DataFileTypes for the specification of allowed file types (and mbccheckindataloadingfcn to specify your own data loading function). If filetype is not provided, then MBC will attempt to infer the file type from the file extension, i.e. if the file extension is .xls then MBC will try the Excel File Loader.
If filename is not provided then no data will be loaded into the new data object. Data can be loaded subsequently using ImportFromFile, provided that editing of the data object has been enabled via a call to BeginEdit. Call CommitEdit to apply edits.
If you create the data object specifying a filename, then the Name property is set to the filename. However, if you use ImportFromFile after creation to load data from a file, the name of the data object does not change.
The second syntax is a function. Use this to create a new data object independent of any project. You can use AttachData to use the data object in another test plan, e.g.,
d = mbcmodel.CreateData( filename ); testplan.AttachData( d );
data = CreateData(P, 'D:\MBCWork\data1.xls');
D = mbcmodel.CreateData;
D = mbcmodel.CreateData('D:\MBCWork\data.xls');Where P is an mbcmodel.project object.
DataFileTypes, BeginEdit, CopyData, RemoveData, Data, ImportFromFile, CommitEdit, AttachData
![]() | CreateConstraint | CreateDesign | ![]() |

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 |