Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 296 Vote(s) - 3.4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connect to Matlab engine from C in Linux

#1
I'm trying to call the Matlab engine programatically from a C program on Linux (Matlab r2009a, Ubuntu 9.10).

I've got my own code (which works in Windows), but for now I'm just trying to get the Matlab "engdemo.c" program to work on Linux. I have managed to compile & link it (after including about 15 `-l<lib>` switches on the gcc command line), and even resolved all the runtime dynamic links via some ldconfig magic.

But, when the program runs, I just get the "Can't start MATLAB engine" error message and the program ends, with no indication of why it failed.

Has anybody made this work? What have I forgotten to do?

p.s. I originally asked this on SuperUser because I think it's configuration related, but I see other Matlab engine-related ?'s here so I thought I'd give it a go.
Reply

#2
You should run `strace` on your C program to see where things go wrong. Typically, I found that most of the time it comes down to either:

* Not having `csh` installed
* Having the environment set wrong, sometimes `LS_COLORS` screws things up with `csh`
Reply

#3
MathWorks has documented this on [their website][1], specifically the following note:

> **Note:** To run MATLAB engine on the UNIX platform, you must have the C shell `csh` installed at `/bin/csh`.


[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through