Call MATLAB from java

2 次查看(过去 30 天)
Hi!
I'm developing a software to interact with piano melodies in java using Netbeans IDE 8.0.2. There is a feature in my system to get a piano melody audio file in wav format and output the notations. In order to identify notes in the melody I used MATLAB 7.12.0 (R2011a) and already I can get the output. Now I want to execute that MATLAB commands in my java interface. So how can I try this? I saw there are some available libraries called MatlabControl and javabuilder. But I don't have a clear path to use those libraries correctly. I'm so glad if anyone can guide me.
Thanks in advance.

采纳的回答

Malcolm Lidierth
Malcolm Lidierth 2016-5-19
"I'm developing a software to interact with piano melodies in java using Netbeans IDE 8.0.2"
[1] There may be no need to do anything more than compile your code, add the jar to MATLAB's java path (using javaaddpath) and call into your code from MATLAB. In this case, MATLAB provides your work environment but you have access to the java code from it. Your code and MATLAB share a Java Virtual Machine, so all is easy.
[2] MatlabControl let's you run a java application but invoke and use the MATLAB engine from inside it. Typically, you will need pretty good knowledge of both MATLAB and Java. Java then provides your front-end with MATLAB being used typically for number crunching.
[3] Builder tools from TMW let you deploy a mixed Java/MATLAB code base as an app and, if you have the appropriate license, to deploy to end-users who do not have MATLAB.
Of these approaches, [1] is easiest/cheapest and ou can put a Java GUI on the front-end using AWT/Swing/JavaFX.
ML

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Call Java from MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by