Questions tagged [matlabcontrol]

matlabcontrol is a Java API that allows for calling MATLAB from Java.

matlabcontrol is a Java API that allows for calling MATLAB from Java. You can eval, feval, as well as get and set variables. Interaction can be performed from either inside MATLAB or outside MATLAB.

Related Links:

14 questions
7
votes
1 answer

Why does matlabcontrol interrupt calling thread upon proxy create?

I made my Matlab controlling thread interruptable and found, that it is interrupted all the time on first run. This is because GetProxyRequestCallback has interrupting code inside: private static class GetProxyRequestCallback implements…
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
2
votes
1 answer

call MATLAB in Java via MatlabControl.java

Recently I am trying to write a java application that can execute matlab code but faced some problems. First of all, I refer to the link: http://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html It has some tips to execute matlab code under…
Tsung-Hsiang Wu
  • 81
  • 3
  • 10
1
vote
0 answers

Application (Java + Matlab) uses too much memory only on cluster

I have written a Java application which uses 8 Threads. The application is using matlabcontrol (matconsolectl) to open and use Matlab sessions from within Java. Currently I'm using 4 Matlab sessions (I have created a Matlab session pool). If I'm…
machinery
  • 5,972
  • 12
  • 67
  • 118
1
vote
1 answer

Use the package matlabcontrol in my Java application to control Matlab?

I need to connect to Matlab from Java using matlabcontrol. I tried their demos and those are working fine but when I tried to connect to Matlab using my application in Java RCP e4 I get this error (to be clear, my code succeeds in opening an…
1
vote
1 answer

How to hide command window while calling Matlab with matlabcontrol package in Java?

I'm using the matlabcontrol package in Java to connect to Matlab r2015a and start a selected script. This is all working great, but every time I run the script, Matlab opens a command window with the output. This output is already returned in…
Camelaria
  • 284
  • 6
  • 23
1
vote
0 answers

ERROR: All dimension arguments must be greater than zero while startin parpool from Java

If I run Matlab normally, then gcp command causes normal creation of parallel pool. If I run the same Matlab from Java's matlabcontrol, then gcp command does not work with the following error: >> gcp Starting parallel pool (parpool) using the…
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
1
vote
0 answers

Is it possible to display commands, executed with matlabcontrol's eval method?

Is it possible to display commands, executed with matlabcontrol's eval method? For example, if I do proxy.eval("A=2"); can I see input in Matlab, like
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
0
votes
1 answer

Java FX application stuck when Java opens Matlab

I'm making a program which sends some data to the Matlab and receives output from matlab. To do that, I used matlabcontrol library. Problem After I click Java FX application button to submit data, matlabcontrol opens Matlab for further…
sam1234
  • 33
  • 1
  • 8
0
votes
1 answer

How can my Java program use MATLAB continuously without having to establish a connection everytime?

I have a MATLAB script running on a Java Eclipse project via the matlabcontrol.jar package. I have the following set-up MatlabProxyFactoryOptions options = new MatlabProxyFactoryOptions.Builder() …
Yousef Hindy
  • 73
  • 1
  • 1
  • 6
0
votes
0 answers

matlabcontrol fails to start MATLAB when executed from jar-file

I am using matlabcontrol to start matlab-sessions and everything works fine if i start it from eclipse. A new Matlab-session is opened or, if one is already open&connected, the old one is reactivated. However, I want to do this via a windows command…
R. Engel
  • 16
  • 2
0
votes
0 answers

(matlabcontrol library) How to send matrix from Java to Matlab?

How can I send with the MatlabControl JMI Wrapper a 2D matrix or 1D matrix (vector) from Java to a Matlab script? For example, the Matlab script takes as argument a 2D matrix A or a 1D matrix (vector) a. Second, Does Java wait until Matlab has…
machinery
  • 5,972
  • 12
  • 67
  • 118
0
votes
1 answer

java, matlabcontrol, using eval and feval

i have problems with matlabcontrol liblary especially using eval and feval function. this is my program package matlab; import java.io.IOException; import java.util.Arrays; import java.util.logging.Level; import…
2r83
  • 659
  • 1
  • 11
  • 21
0
votes
1 answer

Matlabcontrol: isExistingSession vs. setUsePreviouslyControlledSession

I've made a web service using Java 7 and Matlabcontrol-4.1.0. In this web service, i'm starting a Matlab r2015a session to execute a function. As far as I can see, isExistingSession and setUsePreviouslyControlledSession are functions to use a…
Camelaria
  • 284
  • 6
  • 23
0
votes
2 answers

How to get elements of an array in matlab when an array is passed from java to matlab function using matlabcontrol API in java?

i am using matlabcontrol API in java to connect matlab and java. I am calling matlab function using returningFeval and passing function name and Object array. Java Code Object[] path = new Object[2]; path[0]=imgp1; …