use matlab engine
来源:互联网 发布:linux版本 编辑:程序博客网 时间:2024/04/29 23:54
Include Path
Project->Properties->C/C++ Build->Settings. Includes, /opt/MATLAB/extern/include
Libraries
We need to specify that both the "eng" and "mx" Matlab libraries should be linked with our executable. We'll also specify inside eclipse the library search path. In our installation, the libraries can be found at /opt/matlab/bin/glnx86. For 64-bit installations, replace glnx86 with glnxa64. If neither of these directories exist on your machine, then perform a find from the installation root: "find . -name libmx.so".
An alternative to using rpath would be to update the library search path in /etc/ld.so.conf. On an Ubuntu installation, we can create a matlab.conf file inside /etc/ld.so.conf.d. Inside this text file, we list the library path: /opt/matlab/bin/glnx86. After updating the file, run sudo ldconfig. You may get warnings that the .csf files in the directory are not ELF files, and this is probably not desirable for your installation
Environment
You should now be able to compile and link your application with the Matlab engine. However, before you can connect to it successfully, you need to take care of a couple environment issues:
Make sure the matlab executable is in your path. If it's not, then a simple solution is to put a symbolic link to the executable in /usr/bin: "ln -s /opt/matlab/bin/matlab /usr/bin/matlab".
The Matlab engine on Linux also requires a "c shell" to be installed. Confirm that it is installed and on the system path by running "which csh".
Project->Properties->C/C++ Build->Settings. Includes, /opt/MATLAB/extern/include
Libraries
We need to specify that both the "eng" and "mx" Matlab libraries should be linked with our executable. We'll also specify inside eclipse the library search path. In our installation, the libraries can be found at /opt/matlab/bin/glnx86. For 64-bit installations, replace glnx86 with glnxa64. If neither of these directories exist on your machine, then perform a find from the installation root: "find . -name libmx.so".
An alternative to using rpath would be to update the library search path in /etc/ld.so.conf. On an Ubuntu installation, we can create a matlab.conf file inside /etc/ld.so.conf.d. Inside this text file, we list the library path: /opt/matlab/bin/glnx86. After updating the file, run sudo ldconfig. You may get warnings that the .csf files in the directory are not ELF files, and this is probably not desirable for your installation
Environment
You should now be able to compile and link your application with the Matlab engine. However, before you can connect to it successfully, you need to take care of a couple environment issues:
Make sure the matlab executable is in your path. If it's not, then a simple solution is to put a symbolic link to the executable in /usr/bin: "ln -s /opt/matlab/bin/matlab /usr/bin/matlab".
The Matlab engine on Linux also requires a "c shell" to be installed. Confirm that it is installed and on the system path by running "which csh".
0 0
- use matlab engine
- Use Docker Engine plugins
- c++调用matlab engine方法
- [JavaScript] Use template engine in Dojo
- How to use Google search engine
- 使用VC调用matlab engine编程
- c 调用 matlab engine 自定义函数
- C/C++与Matlab engine 混合编程
- C/C++与Matlab engine 混合编程
- note on c++ call matlab engine
- BP神经网络,C++调用matlab engine
- 创建Matlab engine的python binding
- matlab engine: 在Codeblocks中使用C++调用matlab
- Python调用MATLAB Install MATLAB Engine for Python
- How to use search engine on network effectively?
- Use Spring to create a simple workflow engine
- Use the edge function in matlab
- 一步步学如何使用VC调用matlab engine编程
- 第六章 背包问题——01背包
- poj1019 Number Sequence,我的思路简单,使用了优化解决
- Jquery中的层次选择器与find()的区别
- 聊聊Memcached的应用
- Andoird onStartCommand()
- use matlab engine
- Android高手进阶教程(五)之----Android 中LayoutInflater的使用!
- Codeforces Round #230 (Div. 2) problem A(小算数)
- u-boot Makefile -- make xxx_config
- 应该知道的几个Linux技巧
- 关于引用形参的解释
- itpp
- 点击显示指定元素,隐藏其他同辈元素
- C++ 改善程序与设计的做法