MATLAB Compiler SDK
Build software components from MATLAB programs
MATLAB Compiler SDK™ extends the functionality of MATLAB Compiler™ to let you build C/C++ shared libraries, Microsoft® .NET assemblies, Java® classes, and Python® packages from MATLAB® programs. These components can be integrated with custom applications and then deployed to desktop, web, and enterprise systems.
MATLAB Compiler SDK includes a development version of MATLAB Production Server™ for testing and debugging application code and Excel add-ins before deploying them to web applications and enterprise systems.
Applications created using software components from MATLAB Compiler SDK can be shared royalty-free with users who do not need MATLAB. These applications use the MATLAB Runtime, a set of shared libraries that enables the execution of compiled MATLAB applications or components.
To generate C and C++ source code from MATLAB, use MATLAB Coder™.
Get Started:
Building Software Components
Follow the same basic process when integrating with another programming language or running on MATLAB Production Server:
- Create your MATLAB application code.
- Package your MATLAB code into a language-specific component or as a deployable archive for MATLAB Production Server using an interactive app or via the command line.
- Integrate the component or MATLAB Production Server client libraries with the host application using your preferred development environment, such as Visual Studio®, Eclipse®, XCode, or others.
- Complete your application and install it on the target computer—a local installation for desktop applications, or a centralized installation for server-based applications
C/C++ Applications
For applications written in C/C++, MATLAB Compiler SDK provides features to:
- Create thread-safe libraries.
- Create a dynamic library file to seamlessly integrate with Visual Studio (for Windows® applications).
- Produce function signatures in a header file and encrypted code in the library file to include in a C or C++ application.
- Support C++ 11 functionality and type-safety and multithread-safety with the C++ MATLAB Data API shared library.
- Call functions asynchronously with the C++ MATLAB Data API shared library, which can be run either in-process or out-of-process.
You can also convert your MATLAB programs to readable and portable C/C++ code and libraries using MATLAB Coder™.
.NET and COM Applications
For applications written in .NET or COM, MATLAB Compiler SDK provides features to:
- Generate .NET or COM wrappers around MATLAB programs so they can be accessed just like native .NET and COM components.
- Run .NET applications on non-Windows platforms using .NET Core.
- Add and access MATLAB code files and MEX-files as public methods of your component.
- Call .NET components from Common Language Specification (CLS)-compliant languages, including C#, F#, VB.NET, or ASP.NET.
- Call COM objects from COM-compliant technology, including Visual Basic® or ASP.
- Use a type-safe interface to integrate with existing interfaces in your .NET application.
- Pass .NET objects directly to and from a compiled MATLAB function.
- Use data conversion classes to manually convert data and manage output data.
- Support Windows Communication Foundation (WCF) with web or enterprise service-oriented architecture (SOA).
- Support the .NET remoting API so you can run your class as a persistent service or execute your component across multiple processes.
Java Applications
For Java applications, MATLAB Compiler SDK offers features to:
- Generate a Java wrapper around MATLAB programs so they behave just like any other Java class. It also creates a Javadoc to identify the properties and methods of the class.
- Add MATLAB files and MEX-files to serve as externally visible class methods of your component.
- Ensure that Java classes are portable and run on all platforms supported by MATLAB. (Note that some toolbox functions are implemented as platform-dependent MEX-files or native libraries, making these functions and any Java components that use them platform-specific.)
- Pass native Java data types to MATLAB functions and automatically convert to MATLAB data types or explicitly select the data type to use.
- Access MATLAB web applications deployed as Java components with SOAs, SOAP services, WSDL, RMI interfaces, HTTP services, Java servlets, and JSPs.
- Use the remote method invocation (RMI) interface to run your class as a persistent service or spread processing across multiple processes or computers.
Python Applications
For Python applications, MATLAB Compiler SDK offers features to:
- Generate Python packages for MATLAB programs, including MEX-files, to be accessed by a Python application or interactive session.
- Pass native Python data types to and from MATLAB functions with automatic conversion.
- Pass multidimensional arrays to and from MATLAB functions in the deployable archives, using the included Python classes.
- Integrate your MATLAB code with a Python application using the MATLAB Engine API. You can then debug and deploy to either MATLAB Production Server or custom Python applications built with MATLAB Compiler SDK.
MATLAB Production Server
Host your MATLAB programs in a secure, scalable, manageable platform with MATLAB Production Server. Functions hosted on MATLAB Production Server can be called from your C/C++, .NET, Java, and Python applications using lightweight client libraries. MATLAB Production Server also provides a RESTful interface to your functions that can be called from a wide variety of applications such as mobile apps. MATLAB Compiler SDK includes a development version of MATLAB Production Server for local testing and debugging application code before deployment to production systems.
Custom Application Server
For developers who prefer to utilize their own infrastructure, components generated with MATLAB Compiler SDK integrate with standard technologies such as ASP.NET, SOAs, WSDL, SOAP, XML, JavaScript®, HTML, HTTP services, Java servlets, and JSPs, as well as Java RMI and .NET remoting for scalability. For applications that need to handle large numbers of concurrent requests, you can create a middle layer of RMI servers between the application server and the compiled MATLAB code.
Packaging Your Components
During the packaging process, MATLAB Compiler SDK incorporates only the MATLAB functions and files that are required to run your program to optimize the size of the resulting component. The MATLAB code is encrypted to protect your source code from users of the applications.
Distributing Your Components
All deployed applications and components use the MATLAB Runtime for royalty-free distribution to users who do not have MATLAB. For desktop platforms, the application and runtime are installed directly on the target computer, while web and enterprise applications, and the associated runtime, can be installed on a centralized server for easier management and distribution. To provide the best experience for users of your application, MATLAB Compiler SDK lets you specify whether to provide the MATLAB Runtime with the installation package or download it automatically during installation.
Java Library Integration
Support for MATLAB string array
Python Version Support for Python Package Integration
Added support for Python 3.8
See release notes for details on any of these features and corresponding functions.