Main Content

Simulink.ProtectedModel.getTunableParameters

Get list of tunable parameters for protected model

Since R2022a

Description

parameters = Simulink.ProtectedModel.getTunableParameters(model) returns the tunable parameters for the protected model specified by model.

example

Examples

collapse all

Suppose you want to protect a model named mymodel and you want the recipient of the protected model to be able to tune parameter values during simulation. You can use the Simulink.ModelReference.protect function to protect the model with all tunable parameters available to the protected model recipient.

Simulink.ModelReference.protect("mymodel",TunableParameters="All")

The Simulink.ProtectedModel.getTunableParameters function returns the tunable parameters of the protected model.

Simulink.ProtectedModel.getTunableParameters("mymodel")
ans = 
  1×2 string array
    "K"    "K2"

Input Arguments

collapse all

Protected model to query, specified as a string scalar or character vector.

Data Types: char | string

Output Arguments

collapse all

Tunable parameters in specified protected model, returned as a string array.

Version History

Introduced in R2022a