getRootInportMap
Create custom object to map signals to root-level inports
Syntax
地图= getRootInportMap('Empty');
地图= getRootInportMap(model,mdl,Name,Value);
地图= getRootInportMap(inputmap,map,Name,Value);
Description
creates an empty map object,地图.Use this map object to set up an empty custom mapping object. Load the model before using this function. If you do not load the model first, the function loads the model to make the mapping and then closes the model afterwards.地图
= getRootInportMap('Empty
');
creates a map object for地图
= getRootInportMap(model
,mdl,Name,Value);model
,mdl
, with block names and signal names specified. Load the model before using this function. If you do not load the model first, the function loads the model to make the mapping and then closes the model afterwards. To create a comma-separated list of variables to map from this object, use thegetInputString
function.
overrides the mapping object with the specified property. You can override only the properties地图
= getRootInportMap(inputmap
,map,Name,Value);model
,blockName
, andsignalName
.Load the model before using this function. If you do not load the model first, the function loads the model to make the mapping and then closes the model afterwards. To create a comma-separated list of variables to map from this object, use thegetInputString
function.
Use thegetRootInportMap
function when creating a custom mapping mode to map data to root-level inports. See the example fileBlockNameIgnorePrefixMap.m
, located in
, for an example of a custom mapping algorithm.matlabroot
/help/toolbox/simulink/examples
Input Arguments
|
Create an empty map object. Default:none |
Name-Value Arguments
Specify optional pairs of arguments asName1=Value1,...,NameN=ValueN
, whereName
is the argument name andValue
is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.
Before R2021a, use commas to separate each name and value, and encloseName
in quotes.
|
Name of model to associate with the root inport map. Default:None |
||
|
Block names of root-level input ports. The tool assigns data to ports according to the name of the root-inport block. If the tool finds a data element whose name matches the name of a root-inport block, it maps the data to the corresponding port. The value for this argument can be:
Default:None |
||
|
Signal names to be mapped. The tool assigns data to ports according to the name of the signal on the port. If the tool finds a data element whose name matches the name of a signal at a port, it maps the data to the corresponding port. The value for this argument can be:
Default:None |
||
|
Name of mapping object to override. Default:None |
Output Arguments
|
Custom object that you can use to map data to root-level input port. To create a comma-separated list of variables to map from this object, use the |
Examples
Tips
Load the model before running this function.
If your custom mapping mode similar to an existing Simulink®地图ping mode, consider using the
getSlRootInportMap
function instead.