Products & Services Solutions Academia Support User Community Company

Learn more about Model-Based Calibration   

ImportFromFile - Load data from file

Syntax

D = ImportFromFile(D, filename, filetype)
D = ImportFromFile(D, filename, 'Excel file', SHEETNAME)

Description

This is a method of the mbcmodel.data object.

First you must use CreateData, than BeginEdit before you can call ImportFromFile to bring data into your new data object, D, as follows:D = ImportFromFile(D, filename, filetype)

Note that you can specify filename and filetype when you call CreateData as a shortcut for loading data from a file. You still need to call BeginEdit before you can make changes to the data.

filename is a string holding the full path to the file to load.

filetype is an optional file type to load. See DataFileTypes for the specification of the allowed file types (and mbccheckindataloadingfcn to specify your own data loading function).

Filetype defaults to 'auto' which will attempt to guess the filetype based on the extension of the file being loaded. i.e. if the file extension is .xls then MBC will try the Excel File Loader.

D = ImportFromFile(D, filename, 'Excel file', SHEETNAME) specifies a sheet name for an Excel file.

Examples

ImportFromFile(D, 'D:\MBCData\Raw Data\testdata.xls');

See Also

CreateData, DataFileTypes, BeginEdit, ImportFromMBCDataStructure, RemoveData, Append

  


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