当前位置:网站首页>应用程序和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 {
边栏推荐
- 保证接口数据安全的10种方案
- Three. JS introductory learning notes 13: animation learning
- Bidding announcement: Panjin people's Hospital Panjin hospital database maintenance project
- Mysql database backup script
- 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"?
- Unity drawing plug-in = = [support the update of the original atlas]
- U3D_ Infinite Bessel curve
- How to understand that binary complement represents negative numbers
- Mesh merging under ue4/ue5 runtime
- C4D learning notes 1- animation - animation key frames
猜你喜欢

Create lib Library in keil and use lib Library

Three. JS introductory learning notes 00: coordinate system, camera (temporarily understood)

2022第四届中国(济南)国际智慧养老产业展览会,山东老博会

webgl_ Enter the three-dimensional world (1)

C4D learning notes 2- animation - timeline and time function

SPI master RX time out interrupt

Numpy --- basic learning notes

Ue4/ue5 multi thread development attachment plug-in download address

AE learning 02: timeline

航运船公司人工智能AI产品成熟化标准化规模应用,全球港航人工智能/集装箱人工智能领军者CIMC中集飞瞳,打造国际航运智能化标杆
随机推荐
Bidding announcement: Panjin people's Hospital Panjin hospital database maintenance project
SPI master rx time out中断
Getting started with webgl (2)
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"?
Keil5 does not support online simulation of STM32 F0 series
When opening the system window under UE4 shipping, the problem of crash is attached with the plug-in download address
TS typescript type declaration special declaration field number is handled when the key key
Asynchronous application of generator function
Spin animation of Cocos performance optimization
Annexb and avcc are two methods of data segmentation in decoding
Function: JS Click to copy content function
持续创作,还得靠它!
招标公告:福建省农村信用社联合社数据库审计系统采购项目(重新招标)
Three. JS introductory learning notes 10:three JS grid
Write sequence frame animation with shader
How to create Apple Developer personal account P8 certificate
nodejs package. JSON version number ^ and~
山东老博会,2022中国智慧养老展会,智能化养老、适老科技展
XMIND frame drawing tool
有钱人买房就是不一样