当前位置:网站首页>应用程序和matlab的通信方式
应用程序和matlab的通信方式
2022-07-07 13:49:00 【notfindjob】
1、mex编程
采用mex编写可以被matlab调用的应用程序模块,此模块没有main函数,仅仅提供被matlab调用的代码。这是一种面向matlab的通信方式,用来补充matlab某些特定的功能不足,需要在运行电脑上安装完整的matlab版本。
2、RPC调用(Remote Process Call)或者 LPC调用(Local Process Call)---在线调用
在应用程序中动态调用matlab的接口,计算方面的工作交给matlab完成,完成后将结果返回给应用程序。这需要在运行电脑上同时打开应用程序和matlab。
1)用VS2017建立一个控制台程序(32还是64需要和matlab的版本匹配)
2)在VS2017的程序中,添加include目录和lib库目录
找到matlab的安装目录,找到”MATLAB\R2016a\extern“目录,将include和lib目录在刚才创建的控制台程序中添加上。
3)在VS2017的控制台程序中编写代码,编译通过(注意应用程序是64位还是32位)
#include <engine.h>
#pragma comment(lib,"libeng.lib")
int main()
{
Engine* pMatlab = engOpen(NULL);
if (pMatlab == NULL) {
printf("Open Matlab Engine error !");
exit(-1);
}
else {
边栏推荐
- Webcodecs parameter settings -avc1.42e01e meaning
- 过度依赖补助,大客户收款难,冲刺“国产数据库第一股”的达梦后劲有多足?
- [excelexport], Excel to Lua, JSON, XML development tool
- The significance of XOR in embedded C language
- Mesh merging under ue4/ue5 runtime
- Webgl texture
- Share the technical details of super signature system construction
- TCP framework___ Unity
- Vertex shader to slice shader procedure, varying variable
- Dotween -- ease function
猜你喜欢
Eye of depth (VI) -- inverse of matrix (attachment: some ideas of logistic model)
分步式监控平台zabbix
webgl_ Enter the three-dimensional world (2)
Getting started with webgl (2)
Numpy --- basic learning notes
webgl_ Enter the three-dimensional world (1)
Mesh merging under ue4/ue5 runtime
JS array foreach source code parsing
webgl_ Graphic transformation (rotation, translation, zoom)
Getting started with webgl (4)
随机推荐
Using eating in cocos Creator
分步式監控平臺zabbix
How to build your own super signature system (yunxiaoduo)?
Whole process analysis of unity3d rendering pipeline
When opening the system window under UE4 shipping, the problem of crash is attached with the plug-in download address
一个普通人除了去工厂上班赚钱,还能干什么工作?
Virtual memory, physical memory /ram what
Use of SVN
SPI master rx time out中断
Three. JS introductory learning notes 03: perspective projection camera
Excessive dependence on subsidies, difficult collection of key customers, and how strong is the potential to reach the dream of "the first share of domestic databases"?
Cut ffmpeg as needed, and use emscripten to compile and run
Bidding announcement: Panjin people's Hospital Panjin hospital database maintenance project
Annexb and avcc are two methods of data segmentation in decoding
Do not use memset to clear floating-point numbers
2022第四届中国(济南)国际智慧养老产业展览会,山东老博会
Clang compile link ffmpeg FAQ
The unity vector rotates at a point
Simple understanding and application of TS generics
Three. JS introductory learning notes 10:three JS grid