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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.