Questions tagged [matlab-engine]

MATLAB Engine is a library to call MATLAB® software from standalone programs, for example written in C/C++ or Fortran.

While files are DLLs encapsulating C/C++ or Fortran code to be used by a main program written in MATLAB, sometimes the inverse is necessary: A main program in C/C++ or Fortran needs to access MATLAB's capabilities. This can be done using MATLAB Engine, which is documented in the MATLAB online help.

Note that a second way to use MATLAB from C/C++ or Fortran is to turn the MATLAB code it be used into a library using MATLAB Compiler.

Questions should have this tag if they are about the use of MATLAB Engine specifically. If the issue also occurs with standalone MATLAB the tag should be avoided and be used instead.

183 questions
0
votes
0 answers

MATLAB Engine for Python: Desktop not supported, Swing is not currently available

I need to start MATLAB in Python using MATLAB Engine API for Python as www-data with GUI/as desktop app. And the following code results in the error: import matlab.engine eng = matlab.engine.start_matlab() eng.desktop(nargout=0) When I try to run…
user3618276
  • 91
  • 2
  • 10
0
votes
0 answers

Matlab engine freezes at MatlabEngi​ne::waitFo​rMatlab when trying to connect

We are trying to use the matlab engine in our QT C++ application, through a PythonQT console. Normal python commands work from within the pythonQT console in our application, however when we attempt to connect to the matlab engine, it hangs at the…
0
votes
1 answer

MATLAB Engine API for Python: changing parameters of the running simulation

I am using the MATLAB Engine API for Python. I have a shared engine in a Python script and then another Python script connected to this shared engine. I would like to ask whether it is possible to change the parameter of the running simulation from…
user3618276
  • 91
  • 2
  • 10
0
votes
1 answer

Install Matlab Engine for Python 3.4.5

I need to install the Matlab engine for Python 3.4.5 in an Anaconda environment. When I try to install the Matlab engine with the following command: sudo python setup.py install --prefix="/home/<>/anaconda3" It creates another folder named…
0
votes
1 answer

How to avoid matlab splash screen while running matlab engine

You could avoid matlab splash screen in normal launch by editing the matlab.desktop file with arguments matlab -nosplash. This is how you do the same when you open matlab engine from C/C++.
0
votes
0 answers

Matlab engine "run" with ruby on rails

I have created a Ruby on Rails web application. This application created an Input-Data file at the end for a Problem which is formulated in Matlab. Now I want start the Matlab Problem with the help of a button in the web application. How can I start…
G.Boer
  • 3
  • 2
0
votes
1 answer

Plot two vectors with Mxarrays into C++ compiler

I'm trying to plot two vectors were i have stored the elements of two mxArrays from MATLAB (using Visual C++ compiler). test1 and test2 are the mxArrays from the MAT-file, and when I print them it is ok. But when I run the program the figure is…
0
votes
0 answers

Need to call Matlab function from python script

I have previously written a ~150 line MATLAB function that I wish to call from Python, instead of re-coding the entire thing into Python. I have found a number of options online (mlabwrap, matlab_wrapper) however they are all fairly old and have all…
mephamah
  • 11
  • 1
0
votes
1 answer

Undefined reference in make

I'm compiling a code with many files and some are located in the local MATLAB installation folder. For this I've added an include to g++ which apparently doesn't resolve well because I get an undefined reference to for all MATLAB-C++ functions (I'm…
Alexis R Devitre
  • 288
  • 2
  • 6
  • 21
0
votes
1 answer

Error 127 g++: Command not found

I've tried to add the following lines to my makefile in order to add some MATLAB plots to my C++ routine, to set the environment variables: export PATH='/APP/MATLAB/R2013a/bin':$PATH export…
Alexis R Devitre
  • 288
  • 2
  • 6
  • 21
0
votes
1 answer

Makefile for C++/MATLAB Engine API

If I understand properly the idea behind the API is to be able to pass some data back and forth from C++ and MATLAB (provided the MATLAB environment is up and running on the computer) to get the best of both worlds. Concretely what I am trying to do…
Alexis R Devitre
  • 288
  • 2
  • 6
  • 21
0
votes
0 answers

"Process finished with exit code 139" error trying to import matlab.engine in python

I'd like to check out matlab engine for Python. I installed it according to the directions here. But just the line import matlab.engine causes my program to quit with exit code 139, which I understand is some kind of memory fault. I'm running…
Katie
  • 808
  • 1
  • 11
  • 28
0
votes
2 answers

returning values from matlab to python (as a dictionary?)

I am using the matlab engine for python. My goal is to pass some info to my matlab script from python, and then store the result. I was able to do this if I created a matlab array of all the values I wanted, but I would really like a dictionary (so…
qRTPCR
  • 1,656
  • 1
  • 13
  • 13
0
votes
1 answer

Where and how to spin up reusable resources (matlab.engine) for IPython cluster Tasks

I've decided to target the creation of some test bench Python scripts that will exercise various algorithms developed by multiple developers under a variety of environments to all be exercised by IPython's parallel distributed cluster capabilities.…
jxramos
  • 7,356
  • 6
  • 57
  • 105
0
votes
1 answer

Getting MATLAB variable (string) from C

I'm writing a small C application that launchs a Matlab script (.m file). I need to exchange some variables and I don't know how to get an array of chars that exists in Matlab. I'm doing something like this: enter code here result =…
Hamming
  • 193
  • 1
  • 1
  • 4