Using MATLAB with Other Programming Languages
With MATLAB®, you can reuse legacy code written in another programming language, create MATLAB powered responsive web sites, or program hardware using error-free embedded C-code generated directly from MATLAB. Teams that use different programming languages can work together, spending more time developing products and less time recoding in another language.
Calling MATLAB from Another Language
With MATLAB Engine APIs, you can use MATLAB from within another programming environment. The APIs enable execution of MATLAB commands from within your programming language without starting a desktop session of MATLAB. MATLAB Engine APIs are available for:
Explore details on calling MATLAB with these languages.
Calling Libraries Written in Another Language from MATLAB
Converting MATLAB Code to C/C++
You can convert your MATLAB algorithms into C/C++ code using MATLAB Coder™. The generated C code is readable and portable, with support for most of the MATLAB language and a wide range of toolboxes. For more details, explore MATLAB Coder, or watch the webinar Da MATLAB a C/C++ in tutta semplicità (47:38).
The choice between using MATLAB Coder and MATLAB Compiler SDK for C/C++ integration depends on your workflow and requirements, including whether you need portable, standalone code. View guidance to help you choose the best solution.
Packaging MATLAB Programs as Software Components
MATLAB programs can be packaged into language-specific software components so you can integrate them with popular programming languages. These components can be integrated with custom applications and deployed to desktop, web, and enterprise systems.
This option is useful if your end user does not have MATLAB. The software components are created using MATLAB Compiler SDK, and can be distributed royalty-free.
The following language components can be generated from MATLAB code:
Using Multiple Integration Approaches
While each of the above sections describe different possibilities for integrating MATLAB with other programming languages, many users combine more than one approach to create a hybrid solution for their needs. While we provide multiple options for you to accomplish complex workflows, MathWorks Consulting Services can also further help you with integration projects.