How to generate a protected model which supports different solvers?
5 次查看(过去 30 天)
显示 更早的评论
Is it possible to generate a protected simulink model which supports different solvers?
I would like to be able to change the solver from euler to RK4 without having to change the protected model.
Is there any way to do that?
0 个评论
回答(1 个)
Lokesh
2023-10-25
Hi Andrea,
I understand that you want to generate a protected model that supports different solvers.
It is not possible to generate a protected Simulink model that supports different solvers. When you protect a Simulink model, the protection is applied to the entire model, including its configuration settings.
Changing the solver from Euler to RK4 (or any other solver) requires modifying the solver settings within the Simulink model. This modification involves changing the solver type, step size, and other solver-specific parameters. Since the solver settings are part of the model's configuration, any changes to the solver settings would require modifying the protected model.
If you need the flexibility to change solvers, one approach is to create multiple versions of the model with different solver configurations and protect each version separately. This allows switching between protected models with different solver settings.
You can refer to the following MATLAB answer to switch between models based on solver settings:
Please refer to the following MATLAB documentation link to know more about Protected models:
I hope you find this helpful.
Best Regards,
Lokesh
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Model Protection 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!