Can I generate a protected model with a different name to the base model
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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.
0 Commenti
Risposte (1)
Jesús Zambrano
il 6 Feb 2020
Hi Rohan,
A possible way is first to create variant models, https://se.mathworks.com/help/simulink/slref/variantsubsystemvariantmodel.html
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.
0 Commenti
Vedere anche
Categorie
Scopri di più su Subsystems in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!