Can MATLAB Compiler read a codebase, with .m scripts, .cpp code, and most importantly, models in .mat files, to generate .h/.cpp or .h/.dll output?

2 visualizzazioni (ultimi 30 giorni)
I have a codebase with matlab scripts, Cpp files and their mex files. Last but not least, the .m scripts load and use models from .mat files.
I need to be able to access to run the functionality on machines without MATLAB license.
Is MATLAB Compiler able to help in this situation? Are their guidelines to help with the process? Please specify the minimum required versions of any product you suggest.

Risposte (1)

Walter Roberson
Walter Roberson il 25 Set 2017
MATLAB Compiler would be for compiling into an executable. If you need .h/.cpp then MATLAB Coder is the product you need. If you need .h/.dll then "MATLAB Compiler SDK" is the product you need.
  2 Commenti
Alexey Kalinichenko
Alexey Kalinichenko il 26 Set 2017
Which version are you talking about? On R2015b here's what I get... Application Compiler produced .exe; Library Compiler produced .h/.dll; Production Server Compiler [SDK] produced .ctf
Do you know if any of these or if Coder will be able to consume .m/.cpp/.mat and produce a complete working code?
Walter Roberson
Walter Roberson il 26 Set 2017
"Application Compiler" is an app that uses MATLAB Compiler product.
"Production Server Compiler" is an app that uses MATLAB Compiler SDK product; see https://www.mathworks.com/help/mps/ml_code/create-a-deployable-ctf-archive-with-the-library-compiler-app.html. It is for use with Production Server, which "lets you incorporate custom analytics into web, database, and production enterprise applications running on dedicated servers or a cloud."
In this context, "apps" are pre-written software that offer convenient user interfaces. I know there are other user interfaces for MATLAB Compiler such as deploytool
"Do you know if any of these or if Coder will be able to consume .m/.cpp/.mat and produce a complete working code?"
Any of those could potentially be used.
MATLAB Compiler, MATLAB Compiler SDK, and Production Server create files of data structures of an internal threaded interpreted language -- the same data structures used by interactive MATLAB. The three of them require a run time interpreter, "MCR" that processes the data structures exactly the same way that MATLAB does (MCR is effectively MATLAB without the parser and with some decryption added in.) The possible destination targets for these products are therefore restricted to the systems that MATLAB itself can run on. Some things cannot be compiled this way. http://www.mathworks.com/help/compiler/unsupported-functions.html
MATLAB Coder creates actual C/C++ code, which can be targetted at any system that supports C/C++ . However, as there is no standard graphics library, the graphics support is greatly restricted. There are a bunch of other restrictions on what can have code generated. https://www.mathworks.com/help/simulink/ug/functions-supported-for-code-generation--categorical-list.html

Accedi per commentare.

Categorie

Scopri di più su Get Started with MATLAB Compiler SDK in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by