如何在主代码中调用Visual Studio 2015 C ++中的MATlab用户定义函数? [英] How to call MATlab user defined function in Visual studio 2015 C++ in main code?

查看:101
本文介绍了如何在主代码中调用Visual Studio 2015 C ++中的MATlab用户定义函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

仅供参考,我是新来的.我有VC ++的主要源代码,其中一些工作是在MATlab中完成的.我不想用C ++编写整个matlab函数,而是用VC ++调用它.有没有简单的方法可以做到这一点?

FYI, I am new to this. I have main source code in VC++ and some of the work is done in MATlab as function. I don't want to write whole matlab function in c++ but rather call it in VC++. Is there any easy way to do that?

在这件事上请帮助我.

亲切的问候

推荐答案

Z.Nizamani

Hi Z.Nizamani,

根据您的描述,我搜索了有关您问题的两个类似主题,请参考它们,可能会对您有所帮助:

According to your description, I have searched two similar threads about your issue, please refer to them and may be helpful for you:

http://stackoverflow.com/questions/6429243/how-to -call-matlab-functions-from-c

http://stackoverflow.com/questions/16258815/call -matlab-code-from-visual-studio-c

如果上述问题仍未解决您的问题,建议您最好将问题发布到以下论坛:

If your question has not been resolved from above threads, I suggest you had better post your issue to the following forum:

https://www.mathworks.com/matlabcentral/answers/index/?s_tid=gn_mlc_an

但是据我所知,Matlab语言是类似于c的语言,如果您能理解该程序,我想我们可以将代码转换为C ++项目.服务年前,我主要研究简单的机器学习和混沌环境,我发现 将程序转换为C ++代码后,程序执行速度得到了提高.

But as far as I know, Matlab language is c-like language, if you could understand the program, I think we could translate the code to C++ project. Serval years before, I mainly study simple machine learning and chaotic environment, I have found that when the program has been translated to the C++ codes, the speed of program execution has been increased.

免责声明:此回复包含对第三方万维网站点的引用. Microsoft为方便您而提供此信息. Microsoft不控制这些站点,也未测试任何软件或在以下站点上找到的信息 这些网站;因此,Microsoft无法对在此找到的任何软件或信息的质量,安全性或适用性做出任何陈述.使用Internet上发现的任何软件都存在固有的危险,Microsoft提醒您. 您需要先确保完全了解风险,然后才能从Internet检索任何软件

Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet

此致

奥斯卡


这篇关于如何在主代码中调用Visual Studio 2015 C ++中的MATlab用户定义函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆