find
Description
returns an array of handles, paths, or names of model elements of type
modelElementsFound = find(slMap,category)category.
Examples
In the Simulink® code mappings of the model autosar_swc, find model workspace parameters.
open_system("autosar_swc"); mapObj = autosar.api.getSimulinkMapping("autosar_swc"); states = find(mapObj,"States")
states = "autosar_swc/Integrator"
Input Arguments
Simulink to AUTOSAR mapping information for a model, previously returned by
slMap =
autosar.api.getSimulinkMapping(-model)model
is a handle, character vector, or string scalar representing the model.
Example: mapObj
Category of model elements that you search for in the model code mappings, as specified as one of the values listed in this table:
| Category | Description |
|---|---|
| "Inports" | An array of block handles of Inports present within the specified model |
| "Outports" | An array of block handles of Outports present within the specified model |
| "Signals" | An array of block handles of Signals present within the specified model |
| "States" | A cell array containing the path handle(s) of all States present in the specified model |
| "DataStores" | An array containing the path handle(s) of all Data Stores present in the specified model |
| "DataTransfers" | A cell array containing the block handles of all Data Transfers present in the specified model |
| "Functions" | A string array of the Function names present in the specified model |
| "FunctionCallers" | A cell array containing the block handle(s) of all Function Caller blocks present in the specified model |
| "ModelParameters" | A cell array containing the model parameter names present in the specified model |
| "ModelParameterArguments" | A cell array containing the model parameter argument names present in the specified model |
Output Arguments
Model elements found, returned as an array of objects, or string vector of object paths or names. Each object or string identifies a model element of the specified category.
| Category | Type of Object Returned |
|---|---|
| Inports, Outports, and Signals | Block handle |
| States | Path handle |
| DataStores | Block handle |
| DataTransfers | Block handle |
| Functions | Function |
| FunctionCallers | Block handle of Function Caller block |
| ModelParameters | Model parameter name |
| ModelParameterArguments | Model parameter argument name |
Version History
Introduced in R2023a
MATLAB Command
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.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)