Find names of all tunable variables
returns a structure containing all the tunable variables in the model
modelName, and their values.
Each leaf of a
struct variable present in the model is given an
entry in the output of
To ensure that the function
.slxc file is not present in the same folder as the model.
Find Tunable Variables in a Model
This example uses the model
sldemo_suspn_3dof and shows how to use
simulink.compiler.getTunableVariables to find the tunable variables
in a model.
Open the model.
Find the tunable variables present in the model.
### Building the rapid accelerator target for model: sldemo_suspn_3dof ### Successfully built the rapid accelerator target for model: sldemo_suspn_3dof Build Summary Top model rapid accelerator targets built: Model Action Rebuild Reason ================================================================================================== sldemo_suspn_3dof Code generated and compiled Code generation information file does not exist. 1 of 1 models built (0 models already up to date) Build duration: 0h 1m 1.066s ans = 1×8 struct array with fields: QualifiedName Value
View a variable and its value.
ans = struct with fields: QualifiedName: "Ixx" Value: 1500
modelName — Name of the model
Name of model for which you want to find tunable parameters, specified as a string
Introduced in R2021a