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

1 view (last 30 days)
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.

Accepted Answer

Fangjun Jiang
Fangjun Jiang on 22 May 2020
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.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!