Filter löschen
Filter löschen

How to generate a protected model which supports different solvers?

5 Ansichten (letzte 30 Tage)
Andrea Amorosi
Andrea Amorosi am 10 Jan. 2022
Beantwortet: Lokesh am 25 Okt. 2023
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?

Antworten (1)

Lokesh
Lokesh am 25 Okt. 2023
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

Kategorien

Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by