当前位置:网站首页>应用程序和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 {
边栏推荐
- 过度依赖补助,大客户收款难,冲刺“国产数据库第一股”的达梦后劲有多足?
- 2022山东智慧养老展,适老穿戴设备展,养老展,山东老博会
- Vertex shader to slice shader procedure, varying variable
- UE4 exports the picture + text combination diagram through ucanvasrendertarget2d
- Numpy -- epidemic data analysis case
- There are many ways to realize the pause function in JS
- Limit of total fields [1000] in index has been exceeded
- C4D learning notes 2- animation - timeline and time function
- 喜讯!科蓝SUNDB数据库与鸿数科技隐私数据保护管理软件完成兼容性适配
- Is it reliable to open an account on Tongda letter with your mobile phone? Is there any potential safety hazard in such stock speculation
猜你喜欢

LeetCode2_ Add two numbers
![Super signature principle (fully automated super signature) [Yun Xiaoduo]](/img/b8/5bafbada054b335568e64c7e1ac6bb.jpg)
Super signature principle (fully automated super signature) [Yun Xiaoduo]

航運船公司人工智能AI產品成熟化標准化規模應用,全球港航人工智能/集裝箱人工智能領軍者CIMC中集飛瞳,打造國際航運智能化標杆

Three. JS introductory learning notes 07: external model import -c4d to JSON file for web pages -fbx import

神经网络c语言中的指针是怎么回事

Write sequence frame animation with shader

【微信小程序】Chapter(5):微信小程序基础API接口
通知Notification使用全解析

OpenGL's distinction and understanding of VAO, VBO and EBO

喜讯!科蓝SUNDB数据库与鸿数科技隐私数据保护管理软件完成兼容性适配
随机推荐
Yunxiaoduo software internal test distribution test platform description document
numpy---基础学习笔记
Create lib Library in keil and use lib Library
leetcode 241. Different Ways to Add Parentheses 为运算表达式设计优先级(中等)
用手机在通达信上开户靠谱吗?这样炒股有没有什么安全隐患
Getting started with webgl (3)
Three. JS introductory learning notes 07: external model import -c4d to JSON file for web pages -fbx import
Unity3D_ Class fishing project, control the distance between collision walls to adapt to different models
10 schemes to ensure interface data security
神经网络c语言中的指针是怎么回事
Three singleton modes of unity (hungry man, lazy man, monobehavior)
TS typescript type declaration special declaration field number is handled when the key key
TCP framework___ Unity
Summary of knowledge points of xlua hot update solution
Vertex shader to slice shader procedure, varying variable
The "go to definition" in VS2010 does not respond or prompts the solution of "symbol not found"
The download button and debug button in keil are grayed out
[excelexport], Excel to Lua, JSON, XML development tool
航運船公司人工智能AI產品成熟化標准化規模應用,全球港航人工智能/集裝箱人工智能領軍者CIMC中集飛瞳,打造國際航運智能化標杆
How to create Apple Developer personal account P8 certificate