当前位置:网站首页>应用程序和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 {
边栏推荐
- SysOM 案例解析:消失的内存都去哪了 !| 龙蜥技术
- Clang compile link ffmpeg FAQ
- webgl_ Enter the three-dimensional world (2)
- Simple understanding and application of TS generics
- The download button and debug button in keil are grayed out
- Is it reliable to open an account on Tongda letter with your mobile phone? Is there any potential safety hazard in such stock speculation
- unnamed prototyped parameters not allowed when body is present
- Function: JS Click to copy content function
- Regular expression string
- Mesh merging under ue4/ue5 runtime
猜你喜欢

Three. JS introductory learning notes 15: threejs frame animation module

Shipping companies' AI products are mature, standardized and applied on a large scale. CIMC, the global leader in port and shipping AI / container AI, has built a benchmark for international shipping

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

webgl_ Enter the three-dimensional world (1)

Dotween -- ease function

Webgl texture

Vite path alias @ configuration

讲师征集令 | Apache SeaTunnel(Incubating) Meetup 分享嘉宾火热招募中!

分步式监控平台zabbix

Spin animation of Cocos performance optimization
随机推荐
Using eating in cocos Creator
JS array foreach source code parsing
Mesh merging under ue4/ue5 runtime
nodejs package. JSON version number ^ and~
Strengthen real-time data management, and the British software helps the security construction of the medical insurance platform
Getting started with webgl (2)
AE learning 01: AE complete project summary
How to understand that binary complement represents negative numbers
Xingruige database was shortlisted as the "typical solution for information technology application and innovation in Fujian Province in 2021"
A JS script can be directly put into the browser to perform operations
Virtual memory, physical memory /ram what
分步式監控平臺zabbix
航天宏图信息中标乌鲁木齐某单位数据库系统研发项目
Three. JS introductory learning notes 00: coordinate system, camera (temporarily understood)
Use moviepy Editor clips videos and intercepts video clips in batches
Shader basic UV operations, translation, rotation, scaling
过度依赖补助,大客户收款难,冲刺“国产数据库第一股”的达梦后劲有多足?
Unity drawing plug-in = = [support the update of the original atlas]
20th anniversary of agile: a failed uprising
leetcode 241. Different Ways to Add Parentheses 为运算表达式设计优先级(中等)