1

Matlab has generally great documentation about its interface with external programming languages such as C/C++ and Fortran.

But, as counter-part, there is a really poor documentation about Matlab's interface with Java: from a few threads I've been reading, Matlab is internally quite massively using Java, but then no real available documentation on how to further improve Matlab capabilities by means of Java methods or whatever.

Would you mind to provide me with some more reliable and solid evidence?

5
  • I assume you've seen this section in the docs: Java Libraries. It has a fairly good cover of the available features Commented Apr 28, 2013 at 16:28
  • undocumentedmatlab.com is also a great resource. Commented Apr 28, 2013 at 16:44
  • See this question: stackoverflow.com/questions/1005887/… Commented Apr 28, 2013 at 17:19
  • @Amro: That's no comment, that's a <strike>space station</strike> answer. Commented Apr 28, 2013 at 22:37
  • @AndrewJanke: haha, posting an answer now Commented Apr 29, 2013 at 0:37

2 Answers 2

3

There is a section in the documentation dedicated to working with Java:

Using Java Libraries in MATLAB

It explains in good details all the Java features available in MATLAB.

Once you are comfortable with the basics, make sure to check out Yair Altman's blog as others have suggested. You'll find numerous MATLAB-Java integration articles, often covering undocumented features.

Sign up to request clarification or add additional context in comments.

Comments

2

MATLAB has reasonable support for interacting with Java from MATLAB code. Unfortunately, there is no official support for interacting with MATLAB code from Java. Internally, MATLAB frequently calls Java code from MATLAB code by making use of a private Java MATLAB Interface (JMI) which exists as a jmi.jar in the bowels of MATLAB.

Using jmi.jar directly is rather problematic and of course entirely undocumented. Instead, you can use matlabcontrol which is a Java API which will allow you to call MATLAB from Java. It's a well documented and reliable wrapper around JMI. You can either call MATLAB from within MATLAB or from outside MATLAB in which case an instance of MATLAB is launched and connected to. It allows for invoking eval and feval in MATLAB and returning the results to MATLAB. The walkthrough explains with examples how to do this.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.