Can I generate a protected model with a different name to the base model

2 visualizaciones (últimos 30 días)
I am using the Simulink.ModelReference.protect function for generating protected models. My model depends on a global variable 'NumberOfVehicles' for vector sizing, however this is burnt into the model when generating the protected model. I would therefore like to be able to generate a few different versions of the protected model, all generated from the same base model, having different settings for NumberOfVehicles. E.g. I have MyModel.slx, and I want to be able to generate;
MyModel_50Vehicles.slxp
MyModel_100Vehicles.slxp
MyModel_200Vehicles.slxp
However, the Simulink.ModelReference.protect only accepts the name of the model it's generating from and generates the protected model with the same name. Is there a nice* way of calling Simulink.ModelReference.protect such that I can independently set the name of the generated protected model?
*Clearly I could copy the base model with a new name for each model that I want to generate, but that does seem a little messy.

Respuestas (1)

Jesús Zambrano
Jesús Zambrano el 6 de Feb. de 2020
Hi Rohan,
each of them with the specific version of your model, and then create the protected version of all of them. I´m afraid you cannot change the name when creating a protected model.

Categorías

Más información sobre Subsystems en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by