DataObj = CreateData(ProjObj)
creates a data object in a project object ProjObj. If you do not
want to associate a data object with a project object use the mbcmodel
namespace function, mbcdata.
DataObj = CreateData(ProjObj,Filename)
creates a data object in a project object ProjObj. The data is in
a file, filename, specified as a character vector containing the
full path to the file.
DataObj = CreateData(ProjObj,Table)
creates a data object in a project object ProjObj. The data is
contained in a table object, Table.
DataObj = CreateData(ProjObj,mbcStruct)
creates a data object for an MBC data structure in a project object
ProjObj. mbcStruct is the MBC data
structure name.
DataObj = CreateData(ProjObj,Filename,Filetype)
creates a data object in a project object ProjObj. The data is in
a file, Filename, specified as a character vector containing the
full path to the file. Filetype is a character vector specifying
the file type.
Project object, specified as a mbcmodel.project object.
Project file path, specified as a character vector.
If you do not specify a Filename, no data is loaded into the new
data object. Load data using ImportFromFile, provided that you enable
editing of the data object by using 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.
Data Types: char | string
Table object.
Data Types: char | string
An MBC data structure is a structure array that contains these fields:
varNames — Cell array of character vectors that hold the names of the variables in the data (1xn or nx1).
varUnits — Cell array of character vectors that hold the units associated with the variables in varNames (1xn or nx1). If array is empty, no units are defined.
data — Array that holds the values of the variables (mxn).
comment — Optional character vector holding comment information about the data.
Character vector specifying the file type. See mbcDataFileTypes for the
specification of allowed file types. If filetype is not provided, the
software infers the file type from the file extension.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.