how can I connect java with matlab

I need a simple way to connect java wih matlab to call scripts in matlab from java

3 件のコメント

Matt
Matt 2014 年 12 月 10 日
This isn't a complete solution, but if you can make system calls from java then you can start matlab processes with command inputs, which allows you some crude matlab control.
Additionally, if you can probably interface with mexed files if you can interface with C or C++ programs from java.
maha abdelkareem
maha abdelkareem 2014 年 12 月 10 日
編集済み: per isakson 2014 年 12 月 10 日
Iam using matlabcontroller it connect correctly and call scripts but the output display in matlab I need to display it in java note:the output of script is an image my code
MatlabProxyFactoryOptions options = new MatlabProxyFactoryOptions.Builder()
.setUsePreviouslyControlledSession(true)
.setHidden(true)
.setMatlabLocation(null).build();
MatlabProxyFactory factory = new MatlabProxyFactory(options);
MatlabProxy proxy = null;
try {
proxy = factory.getProxy();
} catch (MatlabConnectionException ex) {
Logger.getLogger(Bas.class.getName()).log(Level.SEVERE, null, ex);
}
try {
proxy.eval("task33");
} catch (MatlabInvocationException ex) {
Logger.getLogger(Bas.class.getName()).log(Level.SEVERE, null, ex);
}
Ned Twigg
Ned Twigg 2015 年 10 月 20 日
matlabcontrol is fantastic, but it hasn't been updated in a couple years.
I've created a binary-compatible fork on GitHub which is actively maintained called MatConsoleCtl.
Relative to matlabcontrol, it contains these changes
  • available on Maven Central as com.diffplug.matsim:matconsolectl
  • a way to connect to an existing MATLAB session by copy-pasting a string of text to the MATLAB console
  • more descriptive error messages in exceptions
  • compatibility with OSGi classloaders
  • fixed all compiler warnings
  • fixed several tricky bugs which were found by FindBugs
I'm happy to accept any GitHub Issues or Pull-Requests, and I'll be keeping it up-to-date and tested.

サインインしてコメントする。

回答 (1 件)

Sean de Wolski
Sean de Wolski 2014 年 12 月 10 日

0 投票

You can use Builder JA to build java packages from your MATLAB analytics.

カテゴリ

ヘルプ センター および File ExchangeCall Java from MATLAB についてさらに検索

質問済み:

2014 年 12 月 8 日

コメント済み:

2015 年 10 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by