Is it possible to create a library of Model Reference blocks?

1 回表示 (過去 30 日間)
Gerardo Felix
Gerardo Felix 2020 年 5 月 22 日
回答済み: Fangjun Jiang 2020 年 5 月 22 日
The intent is to be able to drag and drop Model Reference blocks from the library onto models. The functions in this library are designed for re-useability across multiple projects. These projects are to be converted to C code using the Embedded Coder, so it seems like it makes most sense to use Model References versus Subsystems.

採用された回答

Fangjun Jiang
Fangjun Jiang 2020 年 5 月 22 日
It is possible but based on what you described, I would say a library of subsystem blocks are better than a library of model reference blocks.
Both can be re-used in multiple instanes. Both support code generation using Embedded Coder. Model reference has many advantages but in your case, you may not use it yet you have to carry the burden. For example, a model reference block (or in fact another separate model) needs and can have its own model configuration. Do you need such a configuration that is different than your model and you are willing to maintain it?
For most typical cases, if your function is truly a "library" and intends to be used by multiple projects, I would say a library of subsystem is the straightforward approach.
Please reference this guideline and decision tree, where "linked subsystem" means library.

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by