フィルターのクリア

How to generate a protected model which supports different solvers?

5 ビュー (過去 30 日間)
Andrea Amorosi
Andrea Amorosi 2022 年 1 月 10 日
回答済み: Lokesh 2023 年 10 月 25 日
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?

回答 (1 件)

Lokesh
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

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by