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.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)