Is there a way to Run Simulations Programmatically when they contain a protected model

1 回表示 (過去 30 日間)
James Marriott
James Marriott 2018 年 9 月 4 日
回答済み: Stephen 2018 年 9 月 4 日
Im looking for a way to run simulations programmatically when they contain a protected model. I have yet to find a way to 'unprotect' the model from the API, and thus I have to manually type the password every time.

回答 (1 件)

Stephen 2018 年 9 月 4 日
You're probably out of luck. The core issue is that protected models such as S-Functions don't have a "mdlLoad" function that runs when you open/load the model in Simulink. As a result, the protection code for your model is probably inserted in the "mdlStart" function of the target code. Unfortunately, this means that the code for checking the password is going to execute every time you run the model. While adding a "mdlLoad" function might be helpful for this particular problem, I imagine Mathworks has concerns about usability issues.


Help Center および File ExchangeMulticore Processor Targets についてさらに検索




Community Treasure Hunt

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

Start Hunting!

Translated by