Which toolboxes are included in the MATLAB Runtime (MCR) for 2021a

I've got an app that requires some MathWorks toolboxes (beyond base MATLAB). I can't seem to find a straight answer when looking around in the documentation. Which official MathWorks toolboxes are included in the 2021a runtime and/or not included? (if that's a shorter list)

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 18 Feb. 2022
Bearbeitet: Walter Roberson am 18 Feb. 2022

0 Stimmen

None of them are included in MCR.
All toolboxes are layered on top of MATLAB. When you compile something using MATLAB Compiler, then any toolboxes you need are detected, and the components of them you need are copied in.
Which toolboxes can be used with MATLAB Compiler is a different question. The technology of some of the toolboxes is not compatible with MCR. See https://www.mathworks.com/products/compiler/compiler_support.html

5 Kommentare

Hmmm ok that makes lots of sense actually, which begs another question. Why cant Matlab make a completely standalone app then?
If it takes all dependencies into account when you compile, why do you still need the runtime?
The dependencies are taken into account in the form of copying in .m and .p and .mdl and .slx as appropriate, and sometimes .mex* files. MATLAB Compiler product is finding the dependencies, but it is not converting them into C/C++ code .
MCR is effectively a copy of the MATLAB execution engine, except without the IDE and with most interpreting of text as commands turned off. Exactly the same execution technology is used for MCR and for interactive MATLAB. So MATLAB Compiler can handle changing data types, and can handle expanding arrays, and objects, and so on, because it uses the same execution engine.
Mathworks also has MATLAB Coder product, which is able to get down to executable without runtime. However, it doesn't have much (if any) graphics capacity and does not implement everything.
Some of the restrictions in MATLAB Coder are marketting restrictions. Some of the restrictions are cost: it costs money to develop and test the Coder substitutions for toolboxes, so Mathworks addresses the ones it thinks have the greatest market value for compiled version first. Some of the restrictions are technical. For example to do interactive graphics you really need a multi-threaded approach, but MATLAB Coder is restricted to single-threaded at this time.
Thank you for the detailed answer. So then I might be SOL with my app because I'm using the VideoReader object, and 'drawrectangle'? Interesting.
MATLAB Compiler would see the calls in your code and would copy in enough to satisfy the needs of the code. It just does not build those functions into MCR "just in case" some code might want to use them.
If you are referring to MATLAB Coder then I don't think it handles drawrectangle but I would need to confirm. It is more likely to support Computer Vision insertShape()
If we filter the list of Image Processing Toolbox functions to show only those that support the extended capability of C/C++ Code Generation, we see that drawrectangle is not listed. This is confirmed by the fact that its documentation page doesn't have an Extended Capabilities section. The VideoReader function's documentation page does have an Extended Capabilities section that lists some usage notes and limitations for its use in C/C++ Code Generation. The insertShape function also lists C/C++ Code Generation in the Extended Capabilities section of its documentation page.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Produkte

Version

R2021a

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by