I have made an algorithm using MATLAB to be run at backend. Also I have created one c++ GUI program to interact with my hardware. I want to integrate the both codes such that MATLAB code runs at backend. How can I do this such that my single application can execute on the devices without MATLAB installed?
2 Answers
You can use for that Matlab Compiler.
When used along with MATLAB Compiler SDK™, you can package MATLAB programs into software components for integration with other programming languages. Large-scale deployment to enterprise systems is supported through MATLAB Production Server™.
All applications created with MATLAB Compiler use the MATLAB Runtime, which enables royalty-free deployment to users who do not need MATLAB. You can package the runtime with the application, or have your users download it during installation.
More information is available here.
Matlab Compiler is not included in the base version of Matlab. You will need additional license to use it.
4 Comments
For a use case like this I would use the Matlab Coder. Details can be found in Mathworks documentation.
From help:
Integrate your MATLAB algorithms as a compiled library component into other software such as a custom simulator
Accelerate computationally intensive portions of your MATLAB code by generating a MATLAB executable (MEX function) that calls the compiled C/C++ code
Prototype your MATLAB algorithms as a standalone executable on PCs and communicate the generated code as design specifications to your software engineers
Implement and verify your MATLAB algorithms on an embedded processor