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
3 answers

Call Matlab in C++ code - using methods in engine.h

I write a C++ program whose only purpose is to call Matlab code. I have a main routine, which read data in a file (matrices with high dimension 90000*24) into C++ structures pass these structures to Matlab code launch the Matlab routine with these…
kiriloff
  • 25,609
  • 37
  • 148
  • 229
0
votes
0 answers

Matlab engine 2014a won't start under Windows 7 64 bit - missing a 2013a dll

I can't start the Matlab Engine using matlab 2014a, Win7 64bit, 64bit build from a c++ program using VS2012 or VS2013, Intel compiler. I can start the engine fine using Matlab 2013a. If I link against 2014a the program complains libmwmfl_scalar.dll…
Rod
  • 21
  • 3
0
votes
1 answer

Linking header files: Matlab Engine and OpenGL

I'm trying to make a C program that interfaces with Matlab via the Matlab Engine, and which also utilizes OpenGL via Glut. I have successfully compiled and run C programs that do one of these things (Matlab Engine OR Glut), but I am having trouble…
Eric Miller
  • 110
  • 7
0
votes
1 answer

Launching the simulation for given step in Matlab

i am working with simulink model where i have to launch my simulation for a specific time period. currently i am using set_param('model_name','StartTime','0','StopTime','5'); set_param('model_name','SimulationCommand','start'); the problem with…
0
votes
1 answer

cmake adds flags,libs from subdirectory which corrupt linking / library linking precedence

I'm trying to compile an application pipeline and link it with my library matlabengine, which acts as a wrapper to Matlab calls. Matlab uses it's own older version of libstc++ which is mixed in Matlab's lib folder .../bin/glnxa64 matlabengine…
Insa
  • 1,610
  • 12
  • 17
0
votes
1 answer

Execute a Simulink model one step using command line

I have given a Simulink model which I am controlling from my C++ program. From the Matlab engine I want to run the Simulink one step at a time for all of my given input. How can I run the simulation from my C++ program one step at a time?
bhawesh
  • 1,310
  • 2
  • 19
  • 57
0
votes
3 answers

Calling MATLAB from C

I'm writing a Java application that needs to be able to run MATLAB commands. To do so, I'm using a C program that the Java application can call upon to interface with MATLAB. However, even after researching the MATLAB engine, I can't seem to figure…
0
votes
1 answer

Multithreaded C++ application using Matlab Engine

I open Matlab engine in an initialization thread, doing : bool MY_MATLAB_ENGINE_o::Open() { // Handle the case where engine is already open if( MatlabEngine ) { return true; } else if( !( MatlabEngine = engOpen( 0 ) ) ) …
CTZStef
  • 1,675
  • 2
  • 18
  • 47
0
votes
0 answers

display text on command window of matlab engine

How to display the text on command window of matlab engine? I used engSetVisible to make engine command window visible, but after I don't see any text in this window, how to do this? I would not like to use engOutputBuffer, then handle this buffer.…
0
votes
1 answer

Error while instantiating MATLAB Engine Interface through COM (Matlab C# Integration)

I have called Matlab functions from C# using COM objects. It runs but on multiple calls it gives an exception while instantiating matlab Engine Interface through COM. //for instantiating MATLAB Engine Interface through COM MLApp.MLAppClass…
0
votes
1 answer

Use MATLAB Engine application without adding MATLAB to the PATH

I am working on a MATLAB Engine application. In order for it to work, MATLAB needs to be added to the PATH environment variable so that the Engine application can find certain DLLs (libeng and libmx). When MATLAB is registered as a COM server, it…
Szabolcs
  • 24,728
  • 9
  • 85
  • 174
0
votes
1 answer

compile c++ program eclipse that uses matlab engine

I am trying to configure eclipse to compile and run the example engdemo.cpp, that uses the matlab engine. I followed the instructions written here, but I have still errors: make all Building target: matlabEngine Invoking: GCC C++ Linker g++…
0
votes
2 answers

Fortran undefined reference to

I'm trying to compile fortran code given to me by a labmate to run some analyses. The program involves calling MATLAB scripts to calculate certain things. The files he gave me were set up to run on a different computer and I'm trying to get them…
Brutus
  • 93
  • 5
0
votes
1 answer

What does it mean when matlab can't find the locale database?

I have a C++ program that uses the matlab interface on linux. When I run the C++ program, I get an error relating to the locale database: MATLAB:I18n:LocaleDatabaseNotFound - Cannot find the MATLAB locale database. The MATLAB process default locale…
Dan
  • 12,157
  • 12
  • 50
  • 84
0
votes
2 answers

Matlab R2007b unresolved externals with Engine utility

I'm trying to run the matlabdemo.c provided with most copies of matlab (mine being Matlab R2007b) and despite my best efforts I keep getting "unresolved externals" errors when I try to compile the program via the Visual Studio Command Prompt. I…
1 2 3
12
13