Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Matlab generate Java Source Code? [closed]

Tags:

java

matlab

MATLAB provides toolboxes (Matlab Coder, Matlab compiler, Simulink Coder) to generate C and C++ source codes for built in function. I am wondering if there is any toolbox or feature to generate java source code ( not encrypted JAR / class files) for the matlab code/built in functions?

like image 747
Shan Avatar asked Jan 11 '13 07:01

Shan


People also ask

Can you write Java on MATLAB?

You can use any MATLAB file in the project to generate sample Java driver files. Although Java driver files are not necessary to create a package, you can use them to implement a Java application, as shown in Compile and Run MATLAB Generated Java Application.

Can Simulink generate code?

Simulink® Coder™ generates standalone C and C++ code from Simulink models for deployment in a wide variety of applications. For a list of DSP System Toolbox™ features supported by Simulink Coder, see Blocks Supported for C Code Generation.

Can MATLAB generate C++ code?

MATLAB Coder can generate C++ code in a namespace, making it easy to integrate with other source code that might have identical function or data type names. The code generator packages all generated functions and type definitions into the namespace.


1 Answers

There is nothing that will convert MATLAB source code into Java source code. The add-on product MATLAB Builder JA will archive and encrypt your MATLAB source code, and create a standalone .jar file wrapper that enables you to call the MATLAB code from Java, but it doesn't produce Java source code.

Note that MATLAB Coder and Simulink Coder produce C, not C++ code, and that MATLAB Compiler works in a similar way to Builder JA, archiving and encrypting your MATLAB code and producing an executable wrapper.

Edit: since release R2015b, functionality to produce .jar files has been moved from MATLAB Builder JA to the new product MATLAB Compiler SDK, which will also produce .dll files and .NET assemblies. MATLAB Builder JA no longer exists as a product.

like image 173
Sam Roberts Avatar answered Oct 08 '22 14:10

Sam Roberts