f



Matlab engine - open interactively?

Matlab 2009b

Hi,

I'd like to use Matlab's engine capabilties from C to send data to Matlab for interactive visualization and manipulation.

1) Windows:
I know in Windows I can run Matlab with the /Automation switch and I get the engine to attach to the existing matlab process, a matlab console window that works how I'd like. Except, it seems I have to run the C exe from within Matlab. I'd rather not have to launch my C exe from Matlab. If I call engwindemo.exe from outside of matlab, I get an error:
"The procedure entry point ?init_application_init@detail@matrix@@YA_NH@Z could not be located in the dynamic link library libmx.dll"

Is this to be expected?

2) OSX:
The docs say in Unix the engine can't attach to an existing matlab process. But is there a way to launch the engine so that it starts an interative matlab session, either with command window or full GUI? That would be very useful. Thanks.

Cheers,
Michael
0
2/15/2010 8:15:08 PM
comp.soft-sys.matlab 211264 articles. 26 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
830 Views

Similar Articles

[PageSpeed] 1

Hi,

I have exactly the same questions... any news on this?

Thanks,

Gustavo

"Michael" <michael@circular-logic.com> wrote in message <hlca0c$kkj$1@fred.mathworks.com>...
> Matlab 2009b
> 
> Hi,
> 
> I'd like to use Matlab's engine capabilties from C to send data to Matlab for interactive visualization and manipulation.
> 
> 1) Windows:
> I know in Windows I can run Matlab with the /Automation switch and I get the engine to attach to the existing matlab process, a matlab console window that works how I'd like. Except, it seems I have to run the C exe from within Matlab. I'd rather not have to launch my C exe from Matlab. If I call engwindemo.exe from outside of matlab, I get an error:
> "The procedure entry point ?init_application_init@detail@matrix@@YA_NH@Z could not be located in the dynamic link library libmx.dll"
> 
> Is this to be expected?
> 
> 2) OSX:
> The docs say in Unix the engine can't attach to an existing matlab process. But is there a way to launch the engine so that it starts an interative matlab session, either with command window or full GUI? That would be very useful. Thanks.
> 
> Cheers,
> Michael
0
gtmartini (1)
9/9/2012 4:17:08 PM
Reply:

Similar Artilces:

Matlab engine with matlab R2010b
Hello All, I'm working with an aplication that use the matlab engine. I made the C++ program and it is working well in my pc with matlab 2007b, but the same very basic program shows an error when I tried to compile it in a pc with matlab R2010b. The error is about the icuuc32.dll. ¿Why is asking this DLL? How can I solve this?. Thanks¡ ...

Matlab Engine with Matlab Runtime Component ?
Hi, I have a c++ application which uses Matlab engine to save data for further use with Matlab. I need to distribute the application to users that do not have Matlab. Is there a way tp use Matlab Engine with Matlab Runtime Component ? How should I change the compilation to do it ? Thanks, Ofra ...

Check for matlab error from Matlab Engine call
Hi, I am using the matlab engine from a C++ program. I call engEvalString() and check for the return value, but the result is zero, even if a Matlab error (like "Undefined function or variable '...') occurs. Is there any way to find out if a Matlab error occured? Thanks, Philipp ...

Do MATLAB Component Runtime come with Matlab Engine?
Hi, I have a MATLAB Component Runtime installation for Matlab v7.2. 1) I want to know if this installation contains Matlab Engine? 2) Or do I need the complete package that contains Matlab IDE also. 3) In this installation it does not have Matlab.exe. 4) Now I want to use API calls available in Matlab to call functions COHERE used to find Coherence and TFE to calculate Transfer function are needed. These functions are available in the MATLAB SP toolbox) The operations required are: 1) I have to call and/or initialize MATLAB from windows form created using C#. 2) Then pass the two array...

Do MATLAB Component Runtime come with Matlab Engine?
Hi, I have a MATLAB Component Runtime installation for Matlab v7.2. 1) I want to know if this installation contains Matlab Engine? 2) Or do I need the complete package that contains Matlab IDE also. 3) In this installation it does not have Matlab.exe. 4) Now I want to use API calls available in Matlab to call functions COHERE used to find Coherence and TFE to calculate Transfe function are needed. These functions are available in the MATLAB S toolbox) The operations required are: 1) I have to call and/or initialize MATLAB from windows form create using C#. 2) Then pass the two a...

MATLAB talking to MATLAB?
For my project, I need to have a client program (MATLAB executable) talking to a server program (also MATLAB executable) to query data. Is there any easy way to accomplish that? I appreciate any help that I can get on that. Thanks. Cheers, Hoi Oops, I forgot to mention. There are multiple clients querying the server, so I guess serial objects + remote serial port wouldn't work. "Hoi Wong" <wonghoi.ee@gmail.com_> wrote in message news:f3ald6$gg4$1@news.Stanford.EDU... > For my project, I need to have a client program (MATLAB executable) > talking to a ser...

Run Matlab ... from Matlab
Hello, Is there any limitation to run Matlab from Matlab, as a system command, on Linux platforms ? I tried to start Matlab, both using the ! syntax (!matlab&) or the system command (system('matlab&')), the Matlab splash screen appears, but the new Matlab session closes rapidly . When I do the same with a script of mine (system('matlab -r "myscript"&')), my script is being executed, but Matlab finally crashes . If I remove the &, it works well, but the first Matlab session is blocked till I close the second one . I run Matlab on a Linux 64bits platform . Thanks in advance, Nicolas On 10-12-03 01:22 AM, Nicolas wrote: > Is there any limitation to run Matlab from Matlab, as a system command, > on Linux platforms ? > I tried to start Matlab, both using the ! syntax (!matlab&) or the > system command (system('matlab&')), the Matlab splash screen appears, > but the new Matlab session closes rapidly . > When I do the same with a script of mine (system('matlab -r > "myscript"&')), my script is being executed, but Matlab finally crashes . > If I remove the &, it works well, but the first Matlab session is > blocked till I close the second one . > I run Matlab on a Linux 64bits platform . It appears there is a parsing problem in the script that invokes Matlab. Here's an example of what I had to do to get around it: !matlab -r \""...

Passing function arguments to Matlab via Matlab Engine
If someone can help me here , it will be greatly appreciated ... I was able to set up the Matlab Engine Call via C properly without any issues.. , done it via a C function calll .. something like this ... : ////////////////////////////////////////////////// #include <math.h> ..... int matlab_call(double Amp) { Engine *ep; mxArray *A = NULL, *result = NULL; if (!(ep = engOpen(""))) { fprintf(stderr, "\nCan't start MATLAB engine\n"); return EXIT_FAILURE; } ... } ////////////////////////////////////////////////// Now i want to...

using breakpoints in C + matlab application (Matlab Engine)
Hi, i'm executing Matlab scripts from my C++ application using Matlab engine. my problem is with putting breakpoint in the Matlab script. when i put a breakpoint in the script, the program indeed stops at the breakpoint, but everything is stuck, and it is impposible to proceed executing the program (C++ and the Matlab script) Regards, Moish Frankel GSM modems and Signal Processing Texas Instruments moish@ti.com ...

MLApp (Matlab API Engine) running without Matlab IDE
Is it a possible (and how) to run Application (written in C#) on a maschine that has just MCR (Matlab Component Runtime)? Details> I am integrating Matlab COM with .NET. Everything works fine od development maschine (with 2007a). But when I deploy my scenario on production maschine (that only has MCR installed) I get error: Retrieving the COM class factory for component with CLSID {A052DEB6-24BF-4425-B4AE-E8C55D264566} failed due to the following error: 80040154. Best regards, Veroljub Zmijanac, intership in Robert Bosch GmbH ...

matlab calling DLL vs. .exe calling matlab engine
Hello, I'm writing an 3D image recognition which sends commands via RS232 to a Robot which moves to the point in 3D. The problem is the serial interface: sending string commands via serial/fprintf is very slow (I really don't know what matlab makes before sending them) in comparison to e.g. Windows hyperterminal. My question is if it is better to execute a dll out of Matlab-code doing the serial things or viceversus writing a program in c++ which uses the matlab-engine ? What could be the fastest way? What are advantages/disadvantages ? Any help would be appreciated. Thanks in advanc...

How to call matlab functions directly from C++ /without calling matlab engine
How to call matlab functions directly from C++ without calling matlab engine. as it is described in this tutorial: http://www.codeproject.com/samples/matlab_cpp.asp I have tried to do something similar in Visual Studio 2005 [Matlab 7, r14] #include <mclcppclass.h> .... mwArray A, B, C; A = magic(mwArray(5)); B = transpose(A); .... but it doesn't compile. I got following errors: error C3861: 'magic': identifier not found error C3861: 'transpose': identifier not found etc... I was looking for header files with declarations of this functions in matlab directory...

possible to run standalone VC+matlab engine program without Matlab installed?
Hi,everyone, Is there a way to run a standalone program (call matlab from VC, the engdemo.c example) on a target machine without Matlab program installed? or use other techniques, like DLL or COM? I want to use matlab graphic ability to generate some nice figures in my standalone program (for presentation purpose). But target machine may not have Matlab installed. Any recommendations? thanks Can you use the MATLAB Compiler? It is designed to build applications that run without MATLAB being installed on the target machine. You can use it to build DLLs, or (with the addition of MATLAB Buil...

Change Matlab search path in 'Matlab's engine" environment under Mac OS
Hi! Im interfacing Matlab from a C Application. Example: Engine *ep = engOpen("\0"); engEvalString(ep, "path(path,'/some/path/to/m-file')"); engEvalString(ep, "SOME_FUNCTION_IN_A_M_FILE"); I cannot use the path function prior to call a '.m' outside of the current search paths. Either sending 'cd' doesn't work. Does anybody know how to call a custom '.m' outside the default search paths? ...

Calling Matlab in C in Matlab
Hi everybody! My problem can be described as follows. I have a tool in Matlab that requires calling an optimisation algorithm in C. This algorithm consists of several C-files, one of which contains the function to be minimised (CFUNCTION), and another is the main algorithm file (CMAIN). Now what I want to do is to call Matlab from CFUNCTION or CMAIN and specify my custom function (MFUNCTION) to be minimised. So, I'm calling Matlab from C from Matlab. I'm a newbie in C and MEX files. Should I rewrite CMAIN as a MEX file and include CFUNCTION in this and then use mxCallMATLAB? Or can...

Calling Compiled MATLAB from MATLAB
Hello everyone, How do I compile MATLAB M files into a form that can then be called from within the MATLAB interpreter? A roundabout way would seem to be to (somehow) Turn the matlab code into C (I think mcc does this), then compile this C code into MEX format and call that. Is there an easier way? I have the MATLAB compiler, so I just need to know what to do with it to get this to work. Thanks in advance, Sina sina.tootoonian wrote: > > > Hello everyone, > > How do I compile MATLAB M files into a form that can then be called > from within the MATLAB interpreter? A roundabout way would seem to > be > to (somehow) Turn the matlab code into C (I think mcc does this), > then > compile this C code into MEX format and call that. Is there an > easier > way? I have the MATLAB compiler, so I just need to know what to do > with > it to get this to work. > > Thanks in advance, > > Sina > > HELP MEX > HELP MEX Or, better, HELP MCC help pcode pseudo code is useful to obfuscate code - protect algorithms, yet still run at full speed and be distributable to other matlab users sina.tootoonian wrote: > > > Hello everyone, > > How do I compile MATLAB M files into a form that can then be called > from within the MATLAB interpreter? A roundabout way would seem to > be > to (somehow) Turn the matlab code into C (I think mcc does this), > then > compile this C code into MEX format and call that...

DLL creating by Matlab for Matlab
I would like to know if it is possible to convert several M-files into one DLL with Matlab (by using mcc or mex or other functions) and use this DLL with Matlab. How can I do that? I could create DLL with mcc -l xxx.m but I can't use this DLL with Matlab (error: "??? The function, script or class xxx cannot be indexed using {} or . indexing.") I have a project on Matlab with just M-files and I want to give this project to someone who want to use it on Matlab too, but I don't want to give him the source M algorithms. Moreover, I don't want to have an executable....

from Delphi to matlab and matlab to delphi
How to send vars from Delphi to Matlab ? and viceverse, from matlab to delphi ? thanks, it is dificult, and not found answers in the internet. jairo serrano wrote: > > > How to send vars from Delphi to Matlab ? and viceverse, from matlab > to delphi ? thanks, it is dificult, and not found answers in the > internet. When I want to use Matlab variables in another program, I write them to file. You can use comma separated files (csv). Try: > help csvwrite > help dlmwrite Works fine for me. Hope this helps, Niels jairo serrano wrote: > How to send vars from Delphi to Matlab ? and viceverse, from matlab > to delphi ? thanks, it is dificult, and not found answers in the > internet. The simplest is with OLE. Have a look here: - Francis Burton, "Callin Matlab from Delphi" #, 19 Nov 2003 4:27 pm </WebX?50@@.eecb61d> Two sample projects are given here: - <http://www.djpate.freeserve.co.uk/Matlab.htm> From Matlab to Delphi you would have to write a mex files, thats more difficult. Regards, Peter hi i did the connection between delphi4.0 and matlab6.5 and I could cacth the value from Delphi to Matlab but can't to cacth the value from Matlab to Delphi, Do you have an idea??? I think that this project it is look like with yours , Did you make this project? Thanks in Advance, Thiago Holanda jairo serrano wrote: > > > How to send vars from Delphi to Matlab ? and viceverse, from matlab > to delphi ? thanks, it...

Matlab plots outside Matlab
I'm making an end-user application where I would like to use Matlab functionality both for calculation and plotting. Matlabs GUI builder guide does not satisfy my needs (no support for f.ex. internal frames and other nescessities), so I'm planning to compile my Matlab code and use other API (Java, QT or something) for GUI. My problem is then, that I loose access to the neat plotting commands availible under matlab GUI... Is there a way of integrating Matlabs plot functionality into another GUI system? - has it been done? - I appreciate any response! - P�l Berge ...

matlab to matlab remote execution
Hi I have two win PCs running matlab 7. One is slow and other is a high spec fast PC. They are connected to LAN. The directory on fast PC where all matlab work takes place has been mounted as a drive on slow PC. Hence this directory on fast PC can be accessed from slow PC's matlab session. I want to let the user on slow PC run some computationally intense M scripts in his matlab session but execute them on fast PC. I tried usual unix like method. First installed telnet server on fast PC. Then used telnet client on slow PC to log on fast PC. If I attempt to start matlab in slow PC telnet ...

matlab engine
Hi, Now,I use the JMatLink to call matlab from Java,I can call matlab successfully ,but when I use engEvalString("a=1"), the commandwindow could not show this command while the workspace has the variable a. I want that when i use the engEvalString("a=1"),the commandwindow(matlab engine's commandwindow) could show this command(a=1).Anyone could help me ??Thank you ! "w w" <wjl3258@163.com> wrote in message <ie2in1$qsl$1@fred.mathworks.com>... > Hi, > Now,I use the JMatLink to call matlab from Java,I can call matlab successfully ...

engine Matlab
Hello! How many samples can be kept in Matlab's engine before getting them with getdata function??? I can't find an answer!!! Thank you! Nadia. ...

parallel matlab
Hi all, I'm going to work on a project involving a parallel version of MATLAB - I'm aware of various efforts like MATLAB-*P and so on Right now I need to read up on some material regarding MATLAB internals eg: How are the ATLAS(or is it BLAS) routines called in MATLAB? How does MATLAB's C code store information in memory, cache'ing etc? How is one to get at those? Do you know of any suitable reference(s)/resource(s)? Thank you very much, Aravind ...

matlab in JAVA or java in MATLAB?
Hi guys I am now experencing a great difficulty in the interation between java and matlab. I have an objective function written in JAVA with has method return an numerical number, i call it 'profit'. The nature of this obtive function (ObjFun.java) is that it takes an parameter input, say C, with different C value, the returned profit value is different. Eventually I want to find the optimized C value which produce the maximun profit (C will be under constrains). Initially I want to use linprog or fminsearch in matlab. So I tried the command in matlab that excutes my ObjFun.java. But it failed because my ObjFun.java will call an external .exe file. and the file path contains spaces which is fine by Java but not matlab. I stuck here, I myself is a Java programmer not good at matlab, I can't find any thing on google about the solution to my problem. So here I propose another idea: call matlab function in JAVA. I need some advise on this. Thank you very much for a reply!!! Lemon can anyone give advice?? "Lemon F" <f.lemon.jin@hotmail.com> wrote in message <i3bag7$i96$1@fred.mathworks.com>... > can anyone give advice?? If you would not have double-posted you would have seen that you already received advice (on the other post): http://www.mathworks.com/matlabcentral/newsreader/view_thread/288403 ...

Spawning matlab from within matlab
Hello all, I would like to spawn multiple matlab processes from an '.m' script. Meaning, run an m-file from a 'parent' Matlab that launches, say, 8 more 'children' matlab processes. I'd like to do it in such a way that the same m-file in the 'parent' is able to close down, or kill, all the 'children' processes. Any suggestions? Joe ...

Web resources about - Matlab engine - open interactively? - comp.soft-sys.matlab


Bing's Home Page For New Years Is Interactively Awesome
So we covered Google's New Years hatched logo but what about Bing, the second most important search engine. If you go to Bing you may see a ...

Learn Piano Interactively
Pianu  is a website that teaches you how to play the piano interactively. I just love the internet so much!

The Real Cost of War, ‘Interactively’
One more reminder of the meaning of Memorial Day and, I promise, I’ll say no more today. In honor of our fallen troops, CNN.com has created an ...


Resources last updated: 3/2/2016 4:26:39 AM