Main Content


Get list of targets that protected model supports



supportedTargets = Simulink.ProtectedModel.getSupportedTargets(protectedModel) returns a list of target identifiers for the code generation targets supported by the specified protected model. The target identifier sim represents simulation support.


collapse all

Add a target to a protected model, and then get a list of supported targets to verify the addition of the new target.

Load the model and save a local copy.


Add a required password for modifying a protected model. If you do not add a password, you are prompted to set a password when you create a modifiable, protected model.


Create a modifiable, protected model with support for code generation.

'CodeGeneration', 'Modifiable',true, 'Report',true);

Configure the unprotected model to support a new target.

 set_param('mdlref_counter', 'SystemTargetFile', 'ert.tlc'); 

Add support to the protected model for the new target. You are prompted for the modification password.


Verify that support for the new target has been added to the protected model.

 st = Simulink.ProtectedModel.getSupportedTargets('mdlref_counter')

Input Arguments

collapse all

Protected model name, specified as a string or character vector.

Output Arguments

collapse all

List of target identifiers for the targets that the protected model supports, specified as a cell array of character vectors.

Version History

Introduced in R2015a